$this loadOptions(
array
$options, [callback
$callback = null], [string
$jsCallback = null])
|
|
Initializes the the options for each select element.
Format is a bit more complex than for a simple select as we need to know which options are related to the ones in the previous select:
Ex: // first select
$select1[0] = 'Pop';
$select1[1] = 'Classical';
$select1[2] = 'Funeral doom';
// second select
$select2[0][0] = 'Red Hot Chilly Peppers';
$select2[0][1] = 'The Pixies';
$select2[1][0] = 'Wagner';
$select2[1][1] = 'Strauss';
$select2[2][0] = 'Pantheist';
$select2[2][1] = 'Skepticism';
// Two selects
// If you have a third select with prices for the cds
$select3[0][0][0] = '15.00$';
$select3[0][0][1] = '17.00$';
// etc
// You can now use
$sel->loadOptions(array
($select1, $select2, $select3));
Parameters:
Called when the element needs to update its value from form's data sources
Hierselect uses the Element's implementation of updateValue() since its values need to be passed through setValue() to properly update options of its child selects.
Overrides
HTML_QuickForm2_Container::updateValue() (Called when the element needs to update its value from form's data sources)