form_multiselect()

form_multiselect([$name = ''[, $options = array()[, $selected = array()[, $extra = '']]]])

Parameters:
  • $name (string) – Field name
  • $options (array) – An associative array of options to be listed
  • $selected (array) – List of fields to mark with the selected attribute
  • $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string
Returns:

An HTML dropdown multiselect field tag

Return type:

string

Lets you create a standard multiselect field. The first parameter will contain the name of the field, the second parameter will contain an associative array of options, and the third parameter will contain the value or values you wish to be selected.

The parameter usage is identical to using form_dropdown() above, except of course that the name of the field will need to use POST array syntax, e.g. foo[].

doc_CodeIgniter
2016-10-15 16:32:20
Comments
Leave a Comment

Please login to continue.