|
| | __construct ($title, $name, $action, $method='post', $addtoken=false) |
| |
| | XoopsForm ($title, $name, $action, $method='post', $addtoken=false) |
| |
| | getTitle () |
| |
| | getName () |
| |
| | getAction () |
| |
| | getMethod () |
| |
| | addElement (&$formElement, $required=false) |
| |
| & | getElements ($recurse=false) |
| |
| | getElementNames () |
| |
| & | getElementByName ($name) |
| |
| | setElementValue ($name, $value) |
| |
| | setElementValues ($values) |
| |
| & | getElementValue ($name) |
| |
| & | getElementValues () |
| |
| | setExtra ($extra) |
| |
| & | getExtra () |
| |
| | setRequired (&$formElement) |
| |
| & | getRequired () |
| |
| | insertBreak ($extra=null) |
| |
| | render () |
| |
| | display () |
| |
| | renderValidationJS ($withtags=true) |
| |
| | assign (&$tpl) |
| |
Definition at line 14 of file form.php.
◆ __construct()
| __construct |
( |
| $title, |
|
|
| $name, |
|
|
| $action, |
|
|
| $method = 'post', |
|
|
| $addtoken = false ) |
#- constructor
- Parameters
-
| string | $title | title of the form |
| string | $name | "name" attribute for the <form> tag |
| string | $action | "action" attribute for the <form> tag |
| string | $method | "method" attribute for the <form> tag |
| bool | $addtoken | whether to add a security token to the form |
Reimplemented in XoopsGroupPermForm.
Definition at line 72 of file form.php.
◆ addElement()
| addElement |
( |
& | $formElement, |
|
|
| $required = false ) |
Add an element to the form
- Parameters
-
| object | &$formElement | reference to a XoopsFormElement |
| bool | $required | is this a "required" element? |
Definition at line 133 of file form.php.
◆ assign()
assign to smarty form template instead of displaying directly
- Parameters
-
| object | &$tpl | reference to a Smarty object |
- See also
- Smarty
Definition at line 426 of file form.php.
◆ display()
displays rendered form
Definition at line 362 of file form.php.
◆ getAction()
get the "action" attribute for the <form> tag
- Returns
- string
Definition at line 112 of file form.php.
◆ getElementByName()
| & getElementByName |
( |
| $name | ) |
|
◆ getElementNames()
get an array of "name" attributes of form elements
- Returns
- array array of form element names
Definition at line 190 of file form.php.
◆ getElements()
| & getElements |
( |
| $recurse = false | ) |
|
get an array of forms elements
- Parameters
-
| bool | get elements recursively? |
- Returns
- array array of
XoopsFormElements
Definition at line 159 of file form.php.
◆ getElementValue()
| & getElementValue |
( |
| $name | ) |
|
Gets the "value" attribute of a form element
- Parameters
-
| string | $name | the "name" attribute of a form element |
- Returns
- string the "value" attribute assigned to a form element, null if not set
Definition at line 260 of file form.php.
◆ getElementValues()
gets the "value" attribute of all form elements
- Returns
- array array of name/value pairs assigned to form elements
Definition at line 276 of file form.php.
◆ getExtra()
get the extra attributes for the <form> tag
- Returns
- string
Definition at line 306 of file form.php.
◆ getMethod()
get the "method" attribute for the <form> tag
- Returns
- string
Definition at line 122 of file form.php.
◆ getName()
get the "name" attribute for the <form> tag
- Returns
- string
Definition at line 102 of file form.php.
◆ getRequired()
◆ getTitle()
return the title of the form
- Returns
- string
Definition at line 92 of file form.php.
◆ insertBreak()
| insertBreak |
( |
| $extra = null | ) |
|
insert a break in the form
This method is abstract. It must be overwritten in the child classes.
- Parameters
-
| string | $extra | extra information for the break @abstract |
Definition at line 344 of file form.php.
◆ render()
◆ renderValidationJS()
| renderValidationJS |
( |
| $withtags = true | ) |
|
Renders the Javascript function needed for client-side for validation
- Parameters
-
| bool | $withtags | Include the < javascript > tags in the returned string |
- Returns
- string|null
Definition at line 373 of file form.php.
◆ setElementValue()
| setElementValue |
( |
| $name, |
|
|
| $value ) |
Sets the "value" attribute of a form element
- Parameters
-
| string | $name | the "name" attribute of a form element |
| string | $value | the "value" attribute of a form element |
Definition at line 226 of file form.php.
◆ setElementValues()
| setElementValues |
( |
| $values | ) |
|
Sets the "value" attribute of form elements in a batch
- Parameters
-
| array | $values | array of name/value pairs to be assigned to form elements |
Definition at line 239 of file form.php.
◆ setExtra()
set the extra attributes for the <form> tag
- Parameters
-
| string | $extra | extra attributes for the <form> tag |
Definition at line 296 of file form.php.
◆ setRequired()
| setRequired |
( |
& | $formElement | ) |
|
make an element "required"
- Parameters
-
Definition at line 321 of file form.php.
◆ XoopsForm()
| XoopsForm |
( |
| $title, |
|
|
| $name, |
|
|
| $action, |
|
|
| $method = 'post', |
|
|
| $addtoken = false ) |
◆ $_action
◆ $_elements
◆ $_extra
◆ $_method
◆ $_name
◆ $_required
◆ $_title
The documentation for this class was generated from the following file: