Class FEComboListBox

Description

This builds a complex dual select box with buttons to move entries from one select box to another.

 From      Actions    To
 --------  Add >>     --------
 |------|  Add All    |------|
 |------|             |------|
 |------|             |------|
 |------|  << Remove  |------|
 |------|  Remove All |------|
 |------|             |------|
 --------             --------

  • author: Walter A. Boring IV
  • copyright: LGPL - See LICENCE

Located in /form/form_elements/FEListBox.inc (line 536)

FormElement
   |
   --FEBoxElement
      |
      --FEDataList
         |
         --FEComboListBox
Direct descendents
Class Description
FEComboListButtonsBox This class builds the FEComboList with buttons below each element
FEComboListBoxVertical This builds a complex dual select box with buttons to move entries from one select box to another. The boxes are stacked vertically instead of horizontally.
Variable Summary
Method Summary
FEComboListBox FEComboListBox (string $label, [boolean $required = TRUE], [int $width = "200px"], [int $height = "100px"], [array $from_data_list = array()], [array $to_data_list = array()])
void enable_ordering ([bool $flag = TRUE])
string form_tag_onsubmit ()
object get_element ()
mixed get_init_value ()
mixed get_value ()
string get_value_text (mixed 0)
string javascript ()
none set_from_label (string $label)
none set_required_values (array $required)
none set_to_label (string $label)
void set_to_list_data ([array $data_list = array()])
void set_value (value $value)
void validate (FormValidation &$_FormValidation)
Variables
mixed $_data_list_to = array() (line 545)

Holds the list of available data elements for the 'to' box.

string $_from_label = 'Available' (line 552)

The from field's label

string $_has_form_on_submit = true (line 568)

This Form Element needs to propogate some js to the Form tag's onsubmit attribute


Redefinition of:
FormElement::$_has_form_on_submit
This Form Element needs to propogate some js to the Form tag's onsubmit attribute
mixed $_ordering = TRUE (line 574)

This flag turns on/off the

ordering mechanism

mixed $_required_values = array() (line 580)

This is an array of all the required

elements for the select list

string $_to_label = 'Selected' (line 559)

The to field's label

Inherited Variables

Inherited from FEDataList

FEDataList::$_data_list
FEDataList::$_disabled_items

Inherited from FEBoxElement

FEBoxElement::$_height
FEBoxElement::$_width

Inherited from FormElement

FormElement::$onBlurJS
FormElement::$onChangeJS
FormElement::$onClickJS
FormElement::$onFocusJS
FormElement::$onSubmitJS
FormElement::$_attributes
FormElement::$_element_name
FormElement::$_errors
FormElement::$_error_message
FormElement::$_form_name
FormElement::$_has_error
FormElement::$_is_disabled
FormElement::$_is_readonly
FormElement::$_is_required
FormElement::$_label_colon_flag
FormElement::$_label_text
FormElement::$_required_field_marker
FormElement::$_slave_elements
FormElement::$_stripslashes
FormElement::$_style_attributes
FormElement::$_validation_enabled
FormElement::$_value
Methods
Constructor FEComboListBox (line 593)

The constructor

FEComboListBox FEComboListBox (string $label, [boolean $required = TRUE], [int $width = "200px"], [int $height = "100px"], [array $from_data_list = array()], [array $to_data_list = array()])
  • string $label: text label for the element
  • boolean $required: is this a required element?
  • int $width: element width in characters, pixels (px), percentage (%) or elements (em)
  • int $height: element height in px
  • array $from_data_list: list of 'from' field data elements (name=>value)
  • array $to_data_list: list of 'to' field data elements (name=>value)
enable_ordering (line 705)

This method turns on the right select box's ability to show the ordering buttons.

void enable_ordering ([bool $flag = TRUE])
  • bool $flag
form_tag_onsubmit (line 860)

This is a method for getting the JS needed for the form tag's onsubmit attribute.

string form_tag_onsubmit ()

Redefinition of:
FormElement::form_tag_onsubmit()
This is a method for getting the JS needed for the form tag's onsubmit attribute.
get_confirm_element (line 982)

This method returns the hidden version of this element for a confirmation page.

NOTE: This is called by the FormProcessor only. It shouldn't be called manually.

  • return: of type hidden
INPUTtag get_confirm_element ()

Redefinition of:
FormElement::get_confirm_element()
This method returns the hidden version of this element for a confirmation page.
get_element (line 717)

This function builds and returns the form element object

object get_element ()

Redefinition of:
FormElement::get_element()
This function builds and returns the form element object. This method ignores the readonly flag.

Redefined in descendants as:
get_init_value (line 647)

This returns the initial value of the element

mixed get_init_value ()

Redefinition of:
FormElement::get_init_value()
This returns the initial value of the element
get_value (line 968)

This function will return the elements value

mixed get_value ()

Redefinition of:
FormElement::get_value()
This function will return the elements value
get_value_text (line 850)

This provides a method

for the FormContent to get access to the text associated with a field. This is only available on FormElements that have text associated with a field. It is used during Confirmation

  • return: - the text associated
string get_value_text (mixed 0)
  • mixed 0: - the value to look up

Redefinition of:
FEDataList::get_value_text()
This provides a method
javascript (line 871)

This method builds the Javascript needed for this element.

  • return: The javascript.
string javascript ()

Redefinition of:
FormElement::javascript()
This method is used for adding any javascript that is used by this element. This will automatically get called and added to the page by the FormProcessor

Redefined in descendants as:
set_from_label (line 616)

Use this method to set the label for the 'from' field

none set_from_label (string $label)
  • string $label
set_required_values (line 637)

Use this method to set required select values

none set_required_values (array $required)
  • array $required: array of valid select list values
set_to_label (line 627)

Use this method to set the label for the 'to' field

none set_to_label (string $label)
  • string $label
set_to_list_data (line 605)

This function sets the array of data to be used in the data list

void set_to_list_data ([array $data_list = array()])
  • array $data_list: data_list - list of data elements (name=>value)
set_value (line 685)

This function will set the initial value for the element

void set_value (value $value)
  • value $value: mixed

Redefinition of:
FormElement::set_value()
This function will set the initial value for the element
validate (line 809)

This function is responsible for performing complete validation and setting the appropriate error message in case of a failed validation

NOTE: This makes sure that the data submitted for both fields is in the original list.

void validate (FormValidation &$_FormValidation)

Redefinition of:
FEDataList::validate()
This function is responsible for performing complete validation and setting the appropriate error message in case of a failed validation

Inherited Methods

Inherited From FEDataList

FEDataList::FEDataList()
FEDataList::disable_item()
FEDataList::get_value_text()
FEDataList::set_list_data()
FEDataList::validate()

Inherited From FEBoxElement

FEBoxElement::FEBoxElement()

Inherited From FormElement

FormElement::FormElement()
FormElement::build_id_name()
FormElement::create_element_name()
FormElement::enable_validation()
FormElement::form_tag_onsubmit()
FormElement::get_attribute()
FormElement::get_confirm_element()
FormElement::get_element()
FormElement::get_element_name()
FormElement::get_errors()
FormElement::get_error_message()
FormElement::get_form_element()
FormElement::get_init_value()
FormElement::get_label()
FormElement::get_label_text()
FormElement::get_required_symbol()
FormElement::get_slave_elements()
FormElement::get_tabindex()
FormElement::get_value()
FormElement::get_value_text()
FormElement::has_error()
FormElement::is_disabled()
FormElement::is_readonly()
FormElement::is_required()
FormElement::javascript()
FormElement::onBlur()
FormElement::onChange()
FormElement::onClick()
FormElement::onFocus()
FormElement::onSubmit()
FormElement::set_attribute()
FormElement::set_colon_flag()
FormElement::set_data_all_slaves()
FormElement::set_disabled()
FormElement::set_element_name()
FormElement::set_error_message()
FormElement::set_form_name()
FormElement::set_label_text()
FormElement::set_onBlur()
FormElement::set_onChange()
FormElement::set_onClick()
FormElement::set_onFocus()
FormElement::set_onSubmit()
FormElement::set_readonly()
FormElement::set_required()
FormElement::set_required_symbol()
FormElement::set_slave_data()
FormElement::set_slave_elements()
FormElement::set_stripslashes()
FormElement::set_style_attribute()
FormElement::set_tabindex()
FormElement::set_title()
FormElement::set_value()
FormElement::validate()
FormElement::_build_element_attributes()
FormElement::_build_javascript()
FormElement::_do_validation()
FormElement::_sanitize_string()

Documentation generated on Fri, 28 Jan 2011 08:52:54 -0500 by phpDocumentor 1.4.3