Form fields: parameters
* Can be used to specify extra options * For now, allows support for multiple selection
This commit is contained in:
parent
90e09c35cd
commit
b888e72eef
2 changed files with 13 additions and 1 deletions
includes/form
|
@ -106,6 +106,9 @@ class FieldView_Select
|
|||
->setAttribute( 'name' , $field->name( ) )
|
||||
->setAttribute( 'id' , $prefix . 'field' )
|
||||
->setAttribute( 'class' , 'form-select' );
|
||||
if ( $field->hasParameter( 'multiple' ) ) {
|
||||
$select->setAttribute( 'multiple' , 'multiple' );
|
||||
}
|
||||
|
||||
$selected = $field->value( );
|
||||
foreach ( $field->options( ) as $value => $obj ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue