Inheritance diagram for FormUI:
Collaboration diagram for FormUI:Public Member Functions | |
| __construct ($name, $formtype=null) | |
| salted_name () | |
| get ($use_theme=null, $process_for_success=true) | |
| out () | |
| output_controls ($forvalidation=false) | |
| pre_out_controls () | |
| validate () | |
| on_success ($callback) | |
| on_save ($callback) | |
| success () | |
| save () | |
| set_option ($option, $value) | |
| get_option ($option) | |
| media_panel ($path, $panel, $callback) | |
| bounce () | |
Public Attributes | |
| $success = false | |
| $submitted = false | |
| $class = array( 'formui' ) | |
| $id = null | |
| $formtype = '' | |
| $properties | |
FormUI Class This will generate the <form> structure and call subsequent controls
For a list of options to customize its output or behavior see FormUI::set_option()
Definition at line 461 of file formui.php.
| FormUI::__construct | ( | $ | name, | |
| $ | formtype = null | |||
| ) |
FormUI's constructor, called on instantiation.
| string | $name The name of the form, used to differentiate multiple forms. | |
| string | $formtype The type of the form, used to classify form types for plugin modification |
Definition at line 494 of file formui.php.
Referenced by __construct().
| FormUI::get | ( | $ | use_theme = null, |
|
| $ | process_for_success = true | |||
| ) |
Produce a form with the contained fields.
| boolean | $process_for_success Set to true to display the form as it would look if the submission succeeded, but do not execute success methods. |
Definition at line 521 of file formui.php.
Referenced by media_panel().
| FormUI::get_option | ( | $ | option | ) |
Get a form option
| string | $option The name of the option to get |
Definition at line 746 of file formui.php.
| FormUI::media_panel | ( | $ | path, | |
| $ | panel, | |||
| $ | callback | |||
| ) |
Configure all the options necessary to make this form work inside a media bar panel
| string | $path Identifies the silo | |
| string | $panel The panel in the silo to submit to | |
| string | $callback Javascript function to call on form submission |
Definition at line 757 of file formui.php.
| FormUI::on_save | ( | $ | callback | ) |
Set a function to call on form submission success
| mixed | $callback A callback function or a plugin filter name. |
Definition at line 671 of file formui.php.
Referenced by save().
| FormUI::on_success | ( | $ | callback | ) |
Set a function to call on form submission success
| mixed | $callback A callback function or a plugin filter name. |
Definition at line 658 of file formui.php.
| FormUI::out | ( | ) |
Output a form with the contained fields. Calls $this->get() and echoes.
Definition at line 598 of file formui.php.
| FormUI::output_controls | ( | $ | forvalidation = false |
) |
Return the form control HTML.
| boolean | $forvalidation True if the controls should output additional information based on validation. |
Definition at line 610 of file formui.php.
Referenced by get().
| FormUI::pre_out_controls | ( | ) |
Return pre-output control configuration scripts for any controls that require them.
Definition at line 626 of file formui.php.
Referenced by get().
| FormUI::salted_name | ( | ) |
Generate a unique MD5 hash based on the form's name or the control's name.
Definition at line 510 of file formui.php.
Referenced by get().
| FormUI::save | ( | ) |
Save all controls to their storage locations
Reimplemented from FormContainer.
Definition at line 706 of file formui.php.
Referenced by success().
| FormUI::set_option | ( | $ | option, | |
| $ | value | |||
| ) |
Set a form option Defaults for options are stored in the $this->options array
| string | $option The name of the option to set | |
| mixed | $value The value of the option |
Definition at line 735 of file formui.php.
| FormUI::success | ( | ) |
Calls the success callback for the form, and optionally saves the form values to the options table.
Definition at line 680 of file formui.php.
Referenced by get().
| FormUI::validate | ( | ) |
Process validation on all controls of this form.
Reimplemented from FormContainer.
Definition at line 644 of file formui.php.
Referenced by get().
| FormUI::$properties |
array(
'action' => '',
'onsubmit' => '',
'enctype' => 'application/x-www-form-urlencoded',
'accept_charset' => 'UTF-8',
)
Reimplemented from FormContainer.
Definition at line 481 of file formui.php.
1.7.1