Function __global->form_input_text
Definitions
sources/form_templates.php
- Get the Tempcode for a text input (textarea).
- 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 |
| $default | string | No | No | required parameter | N/A | N/A | The default value for this input field |
| $required | boolean | No | No | required parameter | N/A | N/A | Whether this is a required input field |
| $display_only | boolean | No | No | False | N/A | N/A | Whether this should not be an actual input field but rather display $description as a paragraph (true: only $pretty_name, $description, $name, $default, and $tabindex are considered) |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
| $scrolls | boolean | No | No | False | N/A | N/A | Whether the field scrolls |
| $maxlength | ?integer | No | No | Null | N/A | N/A | The maximum length of the field (null: unlimited) |
| $rows | ?integer | No | No | Null | N/A | N/A | Number of rows for text input (null: default) |
| $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) |
Returns
- The input field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a text input (textarea).
*
* @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 string $default The default value for this input field
* @param boolean $required Whether this is a required input field
* @param boolean $display_only Whether this should not be an actual input field but rather display $description as a paragraph (true: only $pretty_name, $description, $name, $default, and $tabindex are considered)
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $scrolls Whether the field scrolls
* @param ?integer $maxlength The maximum length of the field (null: unlimited)
* @param ?integer $rows Number of rows for text input (null: default)
* @param ~?mixed $autocomplete The autocomplete field name. (false: explicitly disable autocomplete) (null: no autocomplete attribute unless there's a default for this $name)
* @return Tempcode The input field
*/
function form_input_text($pretty_name, $description, string $name, string $default, bool $required, bool $display_only = false, ?int $tabindex = null, bool $scrolls = false, ?int $maxlength = null, ?int $rows = null, $autocomplete = null) : object
* Get the Tempcode for a text input (textarea).
*
* @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 string $default The default value for this input field
* @param boolean $required Whether this is a required input field
* @param boolean $display_only Whether this should not be an actual input field but rather display $description as a paragraph (true: only $pretty_name, $description, $name, $default, and $tabindex are considered)
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $scrolls Whether the field scrolls
* @param ?integer $maxlength The maximum length of the field (null: unlimited)
* @param ?integer $rows Number of rows for text input (null: default)
* @param ~?mixed $autocomplete The autocomplete field name. (false: explicitly disable autocomplete) (null: no autocomplete attribute unless there's a default for this $name)
* @return Tempcode The input field
*/
function form_input_text($pretty_name, $description, string $name, string $default, bool $required, bool $display_only = false, ?int $tabindex = null, bool $scrolls = false, ?int $maxlength = null, ?int $rows = null, $autocomplete = null) : object

