Jet\Form_Field_MultiSelect / Form_Field::TYPE_MULTI_SELECT
Represents a form array of type SELECT with multiple choices from a list of options.
You need to familiarize yourself with the options chapter.
The Jet\Form_Renderer_Field_Input_MultiSelect renderer is used to display the form field.
Default error codes
Code | Meaning of |
---|---|
Form_Field::ERROR_CODE_EMPTY | The field is marked as required and the value is not selected. |
Form_Field::ERROR_CODE_INVALID_VALUE | The entered value does not match any of the predefined values. |
Parameters
Parameter | Type | Required | Meaning of |
---|---|---|---|
select_options | assoc array | no | Options |
select_options_creator | callable | no | Calling a method that generates a list of selection options. |
Methods
Method | Meaning of |
---|---|
public setSelectOptions( array|Iterator $options ) : void |
Sets a list of options. |
public getSelectOptions( ) : array |
Returns the set list of options. |
public optionIsSelected( string $option_key ) : bool |
Indicates whether the option is selected based on the captured and validated value (or default value) of the form element. |