Forms
Please note: This page is under construction and has not been finished yet.
Introduction
Use the following to retrieve the form class object
Forms methods
open()
Returns a form opening tag.
Parameter | Type | Description | Mandatory |
name | string | Name of the form | Yes |
mode | string | post | get 'post' by default | No |
target | string | The request URL
| No |
options | array | Specify options such as class or autocomplete
| No |
close()
Returns a form closing tag
text()
Returns a text field form element
Parameter | Type | Description | Mandatory |
name | string | Name of the text field | |
value | string | Value of the text field | |
maxlength | integer | Specifies the maxlength element of the text field | |
options | array | Specify options such as class, size or selectize
|
textarea()
bbarea()
Parameter | Type | Description | Mandatory |
name | string | Name of the field | Yes |
value | string | Contents of the field | Yes |
template | string | A string defining the button template to use with bbarea. Included in the core are the following: news, submitnews, extended, admin, mailout, page, comment, signature But you can also use the name of the plugin (e.g. forum) if the plugin provides a bbcode_template.php | No |
mediaCat | string | Name of the media catalog to use (default: _common) Is only used by TinyMCE plugin (if installed and used) | No |
size | string | Size of the bbarea/editor. Use one of the following values: tiny, small, medium, large (default: large) | No |
options | array | Array with options to use with the editor: id: string - In case the bbarea/editor id should be different to the name class: string - the css classes to use counter: boolean - Show a character counter wysiwyg: boolean/string -
| No |
select()
checkbox()
hidden()
button()
carousel()
Render a Bootstrap carousel
tabs()
Render Bootstrap tabs
datepicker()
Date field with popup calendar. Returns UNIX timestamp or string value on submit.
Parameter | Type | Description | Mandatory? |
name | string | The name of the field | Yes |
datestamp | integer|boolean | UNIX timestamp. Set the default value of the field. Default: false | No |
options | array|string | Available options (see examples below):
Default: null | No |
TODO: Clarify possible options and add more examples
Examples:
Last updated