2 $GLOBALS[
'HTML_QUICKFORM_ELEMENT_TYPES'][
'advmultiselect'] = array(
'HTML/QuickForm/advmultiselect.php',
'HTML_QuickForm_advmultiselect');
11 $widget =&
$field[
'widget'];
12 if ( !@$widget[
'repeat'] ) $widget[
'repeat'] = 1;
14 $attributes = array(
'class'=>$widget[
'class'],
'id'=>
$field[
'name']);
16 $attributes[
'multiple'] =
true;
17 $attributes[
'size'] = 5;
21 if ( !isset( $options) ) $options = array();
23 if ( $record and $record->val(
$field[
'name']) ){
24 $vals = $record->val(
$field[
'name']);
25 if ( is_array($vals) ){
26 foreach ( $vals as $thisval){
27 if ( !isset($options[$thisval]) ){
28 $options[$thisval] = $thisval;
34 $el =& $factory->addElement(
'advmultiselect', $formFieldName, $widget[
'label'], $options, $attributes );
38 $el->setButtonAttributes(
'moveup' ,
'class=inputCommand');
39 $el->setButtonAttributes(
'movedown',
'class=inputCommand');
48 $formFieldName =& $element->getName();
51 $val = $element->getValue();
60 return $element->getValue();