HTML_QuickForm_hierselect::setSecOptions() – DEPRECATED: Sets the options for the secondary select


require_once 'HTML/QuickForm/hierselect.php';

void HTML_QuickForm_hierselect::setSecOptions ( array $options )


Sets the options for the secondary select. Options are passed as a two-dimensional array, where the first key is parent id and the second key is child id, as it is needed to know the parent option to which the secondary option relates.

This method has been deprecated. Use setOptions() instead.


array $options

Array of options for the second select


throws no exceptions thrown


see setMainOptions().


This function can not be called statically.

This function is deprecated. That means that future versions of this package may not support it anymore.

Deprecated in release 3.2.2


Setting the hierselect options

=& $form->addElement('hierselect''test''Test:'null'/');

$main[0] = 'Pop';
$main[1] = 'Classical';
$main[2] = 'Funeral doom';

$sec[0][1] = 'Red Hot Chili Peppers';
$sec[0][2] = 'The Pixies';
$sec[1][3] = 'Wagner';
$sec[1][4] = 'Strauss';
$sec[2][5] = 'Pantheist';
$sec[2][6] = 'Skepticism';

DEPRECATED: Sets the options for the first select (Previous) A pseudo-element used for adding raw HTML to form (deprecated) (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.