Class FormUI

Description

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()

  • version: $Id$

Located in /system/classes/formui.php (line 369)

FormContainer
   |
   --FormUI
Variable Summary
mixed $class
mixed $id
mixed $properties
Method Summary
FormUI __construct (string $name)
string get ([boolean $process_for_success = true])
void media_panel (string $path, string $panel, string $callback)
void on_success (mixed $callback)
void out ()
string output_controls ([boolean $forvalidation = false])
string pre_out_controls ()
string salted_name ()
void save ()
void set_option (string $option, mixed $value)
void success ()
array validate ()
Variables
mixed $class = array( 'formui' ) (line 382)
  • access: public

Redefinition of:
FormContainer::$class
mixed $id = null (line 383)
  • access: public
mixed $properties = array(
'action' => '',
'onsubmit' => '',
)
(line 385)
  • access: public

Redefinition of:
FormContainer::$properties

Inherited Variables

Inherited from FormContainer

FormContainer::$caption
FormContainer::$checksum
FormContainer::$controls
FormContainer::$name
FormContainer::$template
FormContainer::$theme_obj
Methods
Constructor __construct (line 395)

FormUI's constructor, called on instantiation.

  • access: public
FormUI __construct (string $name)
  • string $name: The name of the form, used to differentiate multiple forms.
get (line 416)

Produce a form with the contained fields.

  • return: HTML form generated from all controls assigned to this form
  • access: public
string get ([boolean $process_for_success = true])
  • 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.

Redefinition of:
FormContainer::get()
Produce HTML output for all this fieldset and all contained controls
media_panel (line 594)

Configure all the options necessary to make this form work inside a media bar panel

  • access: public
void media_panel (string $path, string $panel, string $callback)
  • string $path: Identifies the silo
  • string $panel: The panel in the silo to submit to
  • string $callback: Javascript function to call on form submission
on_success (line 527)

Set a function to call on form submission success

  • access: public
void on_success (mixed $callback)
  • mixed $callback: A callback function or a plugin filter name.
out (line 467)

Output a form with the contained fields.

Calls $this->get() and echoes.

  • access: public
void out ()
output_controls (line 479)

Return the form control HTML.

  • return: The output of controls' HTML.
  • access: public
string output_controls ([boolean $forvalidation = false])
  • boolean $forvalidation: True if the controls should output additional information based on validation.
pre_out_controls (line 495)

Return pre-output control configuration scripts for any controls that require them.

  • return: The output of controls' pre-output HTML.
  • access: public
string pre_out_controls ()
salted_name (line 405)

Generate a unique MD5 hash based on the form's name or the control's name.

  • return: Unique string composed of 35 hexadecimal digits representing the victim.
  • access: public
string salted_name ()
save (line 565)

Save all controls to their storage locations

  • access: public
void save ()

Redefinition of:
FormContainer::save()
Store each contained control's value under the control's specified key.
set_option (line 583)

Set a form option Defaults for options are stored in the $this->options array

  • access: public
void set_option (string $option, mixed $value)
  • string $option: The name of the option to set
  • mixed $value: The value of the option
success (line 539)

Calls the success callback for the form, and optionally saves the form values to the options table.

  • access: public
void success ()
validate (line 513)

Process validation on all controls of this form.

  • return: An array of strings describing validation issues, or an empty array if no issues.
  • access: public
array validate ()

Redefinition of:
FormContainer::validate()
Runs any attached validation functions to check validation of each control contained in this fieldset.

Inherited Methods

Inherited From FormContainer

FormContainer::append()
FormContainer::checksum()
FormContainer::get()
FormContainer::get_controls()
FormContainer::get_theme()
FormContainer::get_values()
FormContainer::has_user_options()
FormContainer::insert()
FormContainer::move()
FormContainer::move_after()
FormContainer::move_before()
FormContainer::pre_out()
FormContainer::remove()
FormContainer::replace()
FormContainer::save()
FormContainer::validate()
FormContainer::__get()

Documentation generated on Thu, 30 Oct 2008 20:31:16 +0100 by phpDocumentor 1.3.2