Fork me on GitHub

Nibble Development

Nibble Development

PHP classes and libraries for developers

Select dropdown field

The select input is an extension of the same class as the radio input and thus has all of the same arguments. There is however an additional, optional argument available to customise the select field. The basic implementation of the select field is the same as the radio field except the PHP class “Select” is called instead:

Size: The third argument sets the size of the select field, if the value is set to False then the field will be a drop down select input, otherwise a integer can be given which dictates how many options will be shown. If the number of options is greater than the integer given, a scroll bar will appear on the field so all options can still be accessed.

Due to the extra argument in position three, arguments three and four from the radio field are arguments four and five respectively in the selct field. Below is an example, customised select field:

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