All predicatesShow -- Bootstrap form generator

This library provides HTML rules for constructing Bootstrap forms.

Source bt_form(+Contents, +Options)//
Emit a Bootstrap form from Contents. Each element of Contents is one of the following terms:
  • input(Name, Type, InputOptions)
  • select(Name, Values, SelectOptions)
  • checkboxes(Name, Values, BoxOptions)
  • button(Name, Type, ButtonOptions)
  • button_group(Buttons, GroupOptions)
  • hidden(Name, Value)

Options processed:

One of 'form-inline' or 'form-horizontal'. Default is a vertical form.
Number of columns of the grid to use for the label. In use for 'form-horizontal'. Default is sm-2 (a pair)
Source form_style(+Style, +Options)[private]
Source bt_form_element(+Term, +Options)//[private]
Add a single element to the form.
Source bt_label(+Name, +ElementOptions, +FormsOptions)//[private]
Emit a label.
Source bt_input(+Name, +Type, +InputOptions, +FormOptions)//[private]
Emit an input element. InputOptions are:
Initial value of the input
If true, the input is inactive.
If true, the input cannot be edited.
Source bt_select(+Name, +Values, +SelectOptions, +FormOptions)//[private]
Emit a <select> element. SelectOptions:
If present, provides the preselected value
Provides the number of visible options.
Source bt_checkboxes(+Name, +Values, +SelectOptions, +FormOptions)//[private]
Set of checkboxes reported as an array that is a subset of Values.
Source bt_textarea(+Name, +TextAreaOptions, +FormOptions)//[private]
Source bt_button_group(+Buttons, +ButtonOptions, +FormOptions)//[private]
Emit a div for a group of buttons.
Source bt_button(+Name, +Type, +ButtonOptions, +FormOptions)//
Source button_classes(+ElemOptions, +FormOptions)//[private]
Collect the classes from element and form options
Source data(+Options)//[private]
Collect data options.
Source classes(+Options)//[private]
Collect defined classes
Source name_label(+Name, -Label) is det
Determine a label from a name by upcasing the first character and replacing all underscores by spaces.