Public Member Functions | |
| __construct ($id, $method, $action="", $dataform=FALSE) | |
| Constructor. | |
| addElement ($type, $name, $label, $value, $attrs, $tips="") | |
| Add an element to the form. | |
| addHidden ($name, $value) | |
| Add a hidden element. | |
| addHTML ($html) | |
| Add raw HTML to the form. | |
| setSubmitValue ($value) | |
| Set the value of the submit input control. | |
| showPermControls () | |
| Set permission controls visible. | |
| showCancel () | |
| Set cancel button visible. | |
| setValue ($name, $value) | |
| Set a value for an element. | |
| addFileUploadBox ($fieldname, $fieldcaption, $fieldtips, $filecode="") | |
| Get the file upload box. | |
| _getPermsBox ($permtype, $value="", $selgroups="0") | |
| Return the permissions box. | |
| setPerms ($readperm, $writeperm, $groupreadperm, $groupwriteperm) | |
| Set read/write permissions when showing permission controls. | |
| setForm ($value) | |
| Automagically set a new/edit form. | |
| setDefaultValue ($name, $value) | |
| Set default value for an input control. | |
| getHTML () | |
| Get XHTML-rendered form. | |
Private Member Functions | |
| getFormHeader () | |
| Return a form header. | |
| getFCKEditor ($name, $defaulttext="") | |
| Return an FCKeditor object. | |
| getRenderedElement ($label, $element, $tip) | |
| Get a rendered element of the form. | |
| getCancelButton () | |
| Automatically get the cancel button, if visible. | |
| setContentPartForm ($tags, $values=NULL) | |
| Generate the content part of a form. | |
| setPropertiesPartForm ($id=0) | |
| Generate the properties part of a form. | |
| getGroupsCheckBoxes ($permtype, $selgroups) | |
| Return checkboxes to select user groups. | |
Private Attributes | |
| $id | |
| id | |
| $method | |
| form method | |
| $action | |
| form action | |
| $dataform | |
| it's a data form | |
| $groups = NULL | |
| used by getPermsBox() as a buffer | |
| $readperm | |
| read permission (permission controls) | |
| $writeperm | |
| write permission (permission controls) | |
| $groupreadperm | |
| group read permission (permission controls) | |
| $groupwriteperm | |
| group write permission (permission controls) | |
| $form = array() | |
| form structure | |
| $permvisible = FALSE | |
| permission controls visible | |
| $submit = LANG_CONFIRM | |
| submit input control value | |
| $cancelvisible = FALSE | |
| cancel button visible | |
Definition at line 37 of file form.php.
| Form::__construct | ( | $ | id, | |
| $ | method, | |||
| $ | action = "", |
|||
| $ | dataform = FALSE | |||
| ) |
| Form::getFormHeader | ( | ) | [private] |
| Form::getFCKEditor | ( | $ | name, | |
| $ | defaulttext = "" | |||
| ) | [private] |
| Form::getRenderedElement | ( | $ | label, | |
| $ | element, | |||
| $ | tip | |||
| ) | [private] |
| Form::getCancelButton | ( | ) | [private] |
| Form::addElement | ( | $ | type, | |
| $ | name, | |||
| $ | label, | |||
| $ | value, | |||
| $ | attrs, | |||
| $ | tips = "" | |||
| ) |
Add an element to the form.
| type | type of element (button, file, header, hidden, image, password, reset, select, static, submit, text, textarea) | |
| name | name of the element | |
| label | description label | |
| value | default value for most type of elements - select: option list (array), use setDefaultValue() to set the default value | |
| attrs | additional attributes | |
| tips | edit tips |
Definition at line 156 of file form.php.
Referenced by addHidden(), and addHTML().
| Form::addHidden | ( | $ | name, | |
| $ | value | |||
| ) |
Add a hidden element.
| name | hidden control name | |
| value | hidden control value |
Definition at line 174 of file form.php.
References addElement().
| Form::addHTML | ( | $ | html | ) |
Add raw HTML to the form.
| html | raw html to add |
Definition at line 183 of file form.php.
References addElement().
| Form::setSubmitValue | ( | $ | value | ) |
| Form::showPermControls | ( | ) |
| Form::setValue | ( | $ | name, | |
| $ | value | |||
| ) |
| Form::addFileUploadBox | ( | $ | fieldname, | |
| $ | fieldcaption, | |||
| $ | fieldtips, | |||
| $ | filecode = "" | |||
| ) |
| Form::setContentPartForm | ( | $ | tags, | |
| $ | values = NULL | |||
| ) | [private] |
| Form::setPropertiesPartForm | ( | $ | id = 0 |
) | [private] |
| Form::getGroupsCheckBoxes | ( | $ | permtype, | |
| $ | selgroups | |||
| ) | [private] |
| Form::_getPermsBox | ( | $ | permtype, | |
| $ | value = "", |
|||
| $ | selgroups = "0" | |||
| ) |
| Form::setPerms | ( | $ | readperm, | |
| $ | writeperm, | |||
| $ | groupreadperm, | |||
| $ | groupwriteperm | |||
| ) |
| Form::setForm | ( | $ | value | ) |
| Form::setDefaultValue | ( | $ | name, | |
| $ | value | |||
| ) |
| Form::getHTML | ( | ) |
Get XHTML-rendered form.
Definition at line 419 of file form.php.
References getCancelButton(), getFormHeader(), and getRenderedElement().
Form::$id [private] |
Form::$method [private] |
Form::$action [private] |
Form::$dataform [private] |
Form::$groups = NULL [private] |
Form::$readperm [private] |
Form::$writeperm [private] |
Form::$groupreadperm [private] |
Form::$groupwriteperm [private] |
Form::$permvisible = FALSE [private] |
Form::$submit = LANG_CONFIRM [private] |
Form::$cancelvisible = FALSE [private] |
1.5.3