void HTML_QuickForm_hierselect::setSecOptions (
array $options
)
2 番目の select のオプションを設定します。オプションは 2 次元の配列で渡し、 最初のキーが親の ID、2 番目のキーが子の ID となります。 2 番目のオプションの内容を設定するには、親のオプションの内容が必要となります。
このメソッドは非推奨です。かわりに setOptions() を使用してください。
$options
2 番目の select のオプションの配列。
例外はスローされません。
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.
リリース 3.2.2 で廃止予定です。
hierselect のオプションの設定
<?php
$hierSel =& $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';
$hierSel->setMainOptions($main);
$hierSel->setSecOptions($sec);
?>