Fork me on GitHub

Nibble Development

Nibble Development

PHP classes and libraries for developers

Multiple select field

The multi-item select field is a select field in which the user can select more than one of the available options. This field has the same arguments as the checkbox field as well as one more additional, optional argument. A simple instantiation of the MultipleSelect PHP class could look like this:

Size: The third argument, as with the select field, relates to the size of the field displayed/the number of options displayed. The value is an integer and can be False. If the value is False then the multi select field will be the same size as the number of options in it:

As with all of the other option style fields, multi select fields can mix and match custom/automatic array keys for the options argument. Due to the “size” argument being third, arguments three and four from the checkbox field are four and five respectively in the multi select field. A customised multi select could look like this:

Luke Rotherfield

Freelance PHP Developer
is a PHP developer dedicated to writing the most awesome liraries for his fellow devs :) enjoy

Latest posts by Luke Rotherfield (see all)

Leave a Comment