HTML_QuickForm_select::setSize()

HTML_QuickForm_select::setSize() – Sets the select field size, only applies to 'multiple' selects

Synopsis

require_once 'HTML/QuickForm/select.php';

void HTML_QuickForm_select::setSize ( int $size )

Description

This package is not documented yet.

Parameter

integer $size

Size of select field

Throws

throws no exceptions thrown

See

see getSize().

Note

since 1.0

This function can not be called statically.

Sets the default values of the select box (Previous) HTML class for a submit type element (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:

Note by: user@example.com
demo code for a multiple select

$sel =& $form->addElement('select', 'person_id', 'PERSONS', $person_arr);
$sel->setMultiple(TRUE);
$sel->setSize(6);
$sel->setSelected('1,3'); //pre-selects $person_arr[1] and $person_arr[3]

//hope this helps