This section details the types of input items that can be added to
forms via the add_input_item()
method. Examples of each of these types can be seen in the "Forms-
Input Types" example included with Marmot.
Table 11.1. Input item types
| Type | Additional Attributes | Returns |
|---|
| text | label size maxlength instructions input_hint validate error prenotation postnotation tabindex help_url help_url_label
| string |
| password | label size maxlength instructions input_hint validate error prenotation postnotation tabindex help_url help_url_label
| string |
| numeric | label size maxlength instructions input_hint validate error tabindex help_url help_url_label
| string (validated number) |
| percentage | label size maxlength instructions input_hint validate error tabindex help_url help_url_label
| string (validated number between 0-100) |
| currency | label size maxlength instructions input_hint validate error tabindex help_url help_url_label
| string (validated number) |
| email | label size maxlength instructions input_hint validate error tabindex help_url help_url_label
| string (validated e-mail address) |
| phone | label size maxlength instructions input_hint validate error tabindex help_url help_url_label
| string (formatted phone number) |
| list | | string if allow="single" or array if
allow="multiple" |
| option | label list_source
(array) allow
("single"|"multiple") option_orientation
("vertical"|"horizontal") option_label_position
("bottom"|"right") instructions input_hint validate error tabindex help_url help_url_label
| string if allow="single" or array if
allow="multiple" |
| large_text | label columns rows instructions input_hint validate error tabindex help_url help_url_label
| string |
| user_styled | label columns rows instructions input_hint validate error tabindex help_url help_url_label
| string |
| readonly | | string |
| date | label data_format instructions input_hint validate error tabindex help_url help_url_label
| string (validated date) |
| time | label data_format
instructions input_hint validate error tabindex help_url help_url_label
| string (validated date) |
| datetime | label data_format
instructions input_hint validate error tabindex help_url help_url_label
| string (validated date and time) |