Class StandardFormContent

Description

This is a child of the FormContent class to provide a 'standard' look and feel for forms.

It also enables a confirmation 'page' by default.

Located in /form/StandardFormContent.inc (line 26)

FormContent
   |
   --StandardFormContent
Direct descendents
Class Description
A simple Page Layout object child.
Form5Content A simple Page Layout object child.
BBCodeForm This is the Class that handles the building of the Form itself. It creates the Form Elements inside the form_init_elements() method.
Form7Content A simple Page Layout object child.
Step1 A simple Page Layout object child.
Step2 This is a child of the FormContent class to provide a 'standard' look and feel for forms.
Step3 This is a child of the FormContent class to provide a 'standard' look and feel for forms.
Form6Content A simple Page Layout object child.
Variable Summary
Method Summary
StandardFormContent StandardFormContent ( $title, [ $cancel_action = NULL], [ $width = "100%"])
void add_form_block ([string $title = NULL], TABLEtag &$table)
FIELDSETtag &build_form_block ([string $title = NULL], TABLEtag &$content)
void confirm_action ()
InfoTable form (array 0, array 1)
boolean form_action ()
mixed form_confirm ([string $title = "Form Confirmation"], [boolean $show_buttons = TRUE])
object form_content ()
string get_wizard_id ()
void set_action_label (string $label)
void set_cancel_label (string $label)
void set_form_title (string $title)
void set_wizard_id (string $id)
void &_div_wrapper ()
void _form_content_table ([ $width = "100%"], [ $border = 0], [ $cellspacing = 0], [ $cellpadding = 3])
Variables
mixed $action_label = "Save" (line 49)

The label for the Action

mixed $cancel_label = "Cancel" (line 54)

The label for the Cancel action

mixed $_allow_actions = TRUE (line 44)

Allow the default buttons to be shown?

mixed $_form_title = "" (line 33)

The title used in the wrapping table

mixed $_infotable = NULL (line 39)

the InfoTable wrapper that holds all fields.

mixed $_wizard_id = NULL (line 61)

The wizard id associated with this content

if we are being used inside a wizard

Inherited Variables

Inherited from FormContent

FormContent::$_action_counter
FormContent::$_action_message
FormContent::$_cancel_action
FormContent::$_default_label_css
FormContent::$_elements
FormContent::$_error_label_css
FormContent::$_file_elements
FormContent::$_FormValidation
FormContent::$_form_action_elements_on_submit
FormContent::$_form_errors_title
FormContent::$_form_errors_width
FormContent::$_form_name
FormContent::$_form_on_submit
FormContent::$_has_confirm
FormContent::$_has_file_element
FormContent::$_hidden_elements
FormContent::$_is_readonly
FormContent::$_label_colon_flag
FormContent::$_required_field_marker
FormContent::$_required_field_text
FormContent::$_stripslashes
FormContent::$_width
Methods
Constructor StandardFormContent (line 64)
StandardFormContent StandardFormContent ( $title, [ $cancel_action = NULL], [ $width = "100%"])
  • $title
  • $cancel_action
  • $width
add_form_block (line 243)

This function is used to add a block of form fields inside a table to this form.

This table will automatically get wrapped inside a fieldset with a legend tag to label the block

void add_form_block ([string $title = NULL], TABLEtag &$table)
  • string $title: - the title for the fieldset
  • TABLEtag &$table: - the form fields inside a table
build_form_block (line 256)

this builds a fieldset and legend and adds the form table to it.

FIELDSETtag &build_form_block ([string $title = NULL], TABLEtag &$content)
  • string $title: - the legend string
  • TABLEtag &$content: - the form fields in a table
confirm_action (line 210)

This method is responsible for handling the confirmation page's Confirm action.

void confirm_action ()

Redefined in descendants as:
form (line 108)

this builds the main wrapper for the form fields and ads the Save and Cancel buttons

  • return: widget object
InfoTable form (array 0, array 1)
  • array 0: - the form data
  • array 1: - the form error fields (if any)

Redefinition of:
FormContent::form()
This method builds the html form.
form_action (line 193)

This method handles the form action.

  • return: TRUE = success FALSE = failed.
boolean form_action ()

Redefinition of:
FormContent::form_action()
This method handles the

Redefined in descendants as:
form_confirm (line 154)

This function is used to show an intermediary confirmation page. Use this function to show a confirmation of the data that was submitted by the user.

This will get called after all of the form data was successfully validated. All of the form data will automatically be created as hidden form fields. All you have to do is show the data, and a confirm submit button.

  • return: - either raw html, or some container HTMLTag object.
mixed form_confirm ([string $title = "Form Confirmation"], [boolean $show_buttons = TRUE])
  • string $title: - the title for the table
  • boolean $show_buttons: - show the action buttons?

Redefinition of:
FormContent::form_confirm()
This function is used to show an intermediary confirmation page. Use this function to show a confirmation of the data that was submitted by the user.
form_content (line 132)

Child class MUST override this to provide the form fields

object form_content ()

Redefined in descendants as:
  • StandardAccountForm::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • Form5Content::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • BBCodeForm::form_content() : This is the method that builds the layout of where the FormElements will live. You can lay it out any way you like.
  • Form7Content::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • Step1::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • Step2::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • Step3::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
  • Form6Content::form_content() : This method is called by the StandardFormContent object to allow you to build the 'blocks' of fields you want to display. Each form block will live inside a fieldset tag with the a title.
form_content_buttons (line 222)

This function is used to build the standard buttons for a form.

ButtonPanel form_content_buttons ()
get_wizard_id (line 296)

This method gets the wizard id.

string get_wizard_id ()
set_action_label (line 87)

This method is used to change the 'Save' button label.

void set_action_label (string $label)
  • string $label: - the string to use
set_cancel_label (line 96)

This method is used to change the 'Cancel' button label

void set_cancel_label (string $label)
  • string $label: - the cancel string
set_form_title (line 78)

this method sets the form title which is used to wrap the entire form

void set_form_title (string $title)
  • string $title: - the form title
set_wizard_id (line 287)

This method sets the wizard id.

This is called from the FormWizard class

void set_wizard_id (string $id)
  • string $id
_div_wrapper (line 269)
void &_div_wrapper ()
_form_content_table (line 275)
void _form_content_table ([ $width = "100%"], [ $border = 0], [ $cellspacing = 0], [ $cellpadding = 3])
  • $width
  • $border
  • $cellspacing
  • $cellpadding

Inherited Methods

Inherited From FormContent

FormContent::FormContent()
FormContent::add_action()
FormContent::add_action_element()
FormContent::add_cancel()
FormContent::add_element()
FormContent::add_error()
FormContent::add_hidden_action()
FormContent::add_hidden_element()
FormContent::add_image_action()
FormContent::build_confirm_table()
FormContent::element_exists()
FormContent::element_form()
FormContent::element_label()
FormContent::form()
FormContent::form_action()
FormContent::form_backend_validation()
FormContent::form_confirm()
FormContent::form_errors()
FormContent::form_init_data()
FormContent::form_init_elements()
FormContent::form_success()
FormContent::get_action()
FormContent::get_action_element()
FormContent::get_all_element_values()
FormContent::get_default_css()
FormContent::get_element()
FormContent::get_element_value()
FormContent::get_error_array()
FormContent::get_form_errors_width()
FormContent::get_form_name()
FormContent::get_form_tabindex()
FormContent::get_hidden_element_value()
FormContent::get_required_marker()
FormContent::has_confirm()
FormContent::hidden_element_label()
FormContent::is_readonly()
FormContent::javascript()
FormContent::pre_confirm()
FormContent::set_action()
FormContent::set_action_message()
FormContent::set_cancel_action()
FormContent::set_colon_flag()
FormContent::set_confirm()
FormContent::set_default_css()
FormContent::set_element_value()
FormContent::set_error_css()
FormContent::set_form_errors_title()
FormContent::set_form_errors_width()
FormContent::set_form_name()
FormContent::set_form_tabindex()
FormContent::set_form_width()
FormContent::set_hidden_element_value()
FormContent::set_readonly()
FormContent::set_required_marker()
FormContent::set_required_text()
FormContent::set_stripslashes()
FormContent::_pre_confirm()
FormContent::_set_validation_object()
FormContent::_test_element()

Documentation generated on Fri, 28 Jan 2011 08:53:13 -0500 by phpDocumentor 1.4.3