Function __global->form_input_list
Definitions
sources/form_templates.php
- Get the Tempcode for a listbox.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $pretty_name | mixed | No | No | required parameter | N/A | N/A | A human intelligible name for this input field, provided in plain-text format (string or Tempcode) |
| $description | mixed | No | No | required parameter | N/A | N/A | A description for this input field, provided in HTML format (string or Tempcode) |
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | The name which this input field is for |
| $content | Tempcode | No | No | required parameter | N/A | N/A | The list entries for our list; you compose these via attaching together form_input_list_entry calls |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
| $inline_list | boolean | No | No | False | N/A | N/A | Whether this is an inline displayed list as opposed to a dropdown |
| $required | boolean | No | No | True | N/A | N/A | Whether this is required |
| $images | ?array | No | No | Null | N/A | N/A | List of theme images that $content is allowing selection of (so that we can show the images within the list, if JS is enabled) (null: none) |
| $size | integer | No | No | 5 | N/A | N/A | How much space the list takes up (inline lists only) |
| $autocomplete | ~?mixed | No | No | Null | N/A | N/A | The autocomplete field name. (false: explicitly disable autocomplete) (null: no autocomplete attribute unless there's a default for this $name) |
| $read_only | boolean | No | No | False | N/A | N/A | Whether the field should be disabled / read-only |
Returns
- The input field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a listbox.
*
* @param mixed $pretty_name A human intelligible name for this input field, provided in plain-text format (string or Tempcode)
* @param mixed $description A description for this input field, provided in HTML format (string or Tempcode)
* @param ID_TEXT $name The name which this input field is for
* @param Tempcode $content The list entries for our list; you compose these via attaching together form_input_list_entry calls
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $inline_list Whether this is an inline displayed list as opposed to a dropdown
* @param boolean $required Whether this is required
* @param ?array $images List of theme images that $content is allowing selection of (so that we can show the images within the list, if JS is enabled) (null: none)
* @param integer $size How much space the list takes up (inline lists only)
* @param ~?mixed $autocomplete The autocomplete field name. (false: explicitly disable autocomplete) (null: no autocomplete attribute unless there's a default for this $name)
* @param boolean $read_only Whether the field should be disabled / read-only
* @return Tempcode The input field
*/
function form_input_list($pretty_name, $description, string $name, object $content, ?int $tabindex = null, bool $inline_list = false, bool $required = true, ?array $images = null, int $size = 5, $autocomplete = null, bool $read_only = false) : object
* Get the Tempcode for a listbox.
*
* @param mixed $pretty_name A human intelligible name for this input field, provided in plain-text format (string or Tempcode)
* @param mixed $description A description for this input field, provided in HTML format (string or Tempcode)
* @param ID_TEXT $name The name which this input field is for
* @param Tempcode $content The list entries for our list; you compose these via attaching together form_input_list_entry calls
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $inline_list Whether this is an inline displayed list as opposed to a dropdown
* @param boolean $required Whether this is required
* @param ?array $images List of theme images that $content is allowing selection of (so that we can show the images within the list, if JS is enabled) (null: none)
* @param integer $size How much space the list takes up (inline lists only)
* @param ~?mixed $autocomplete The autocomplete field name. (false: explicitly disable autocomplete) (null: no autocomplete attribute unless there's a default for this $name)
* @param boolean $read_only Whether the field should be disabled / read-only
* @return Tempcode The input field
*/
function form_input_list($pretty_name, $description, string $name, object $content, ?int $tabindex = null, bool $inline_list = false, bool $required = true, ?array $images = null, int $size = 5, $autocomplete = null, bool $read_only = false) : object

