bootstrap.pl -- Bootstrap form generator
This library provides HTML rules for constructing Bootstrap forms.
- 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:
- class(+Class)
- One of 'form-inline' or 'form-horizontal'. Default is a vertical form.
- label_columns(+SizeCount)
- Number of columns of the grid to use for the label. In use for 'form-horizontal'. Default is sm-2 (a pair)
- bt_button(+Name, +Type, +ButtonOptions, +FormOptions)//
- name_label(+Name, -Label) is det
- Determine a label from a name by upcasing the first character and replacing all underscores by spaces.