Function __global->form_input_region_multi
Definitions
sources/locations.php
- Get an input for multiple region codes. A new line is added when the prior one isn't blank.This renders as multiple lines of text where region codes can be typed. Additionally, a region selection is rendered at the top which can populate the codes according to country and region name.
- 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 base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'. |
| $_default_array | array | No | No | required parameter | N/A | N/A | An array or map of lines to use as default (at least this many lines, filled by this array, will be presented by default) (map format: [name=>string, readonly=>boolean]) |
| $num_required | integer | No | No | required parameter | N/A | N/A | The minimum number of inputs allowed |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
| $pattern | ?string | No | No | Null | N/A | N/A | Custom regex pattern, covers whole field value (null: none) |
| $pattern_error | ?string | No | No | Null | N/A | N/A | Custom regex pattern validation error (null: none) |
Returns
- The input field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an input for multiple region codes. A new line is added when the prior one isn't blank.This renders as multiple lines of text where region codes can be typed. Additionally, a region selection is rendered at the top which can populate the codes according to country and region name.
*
* @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 base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'.
* @param array $_default_array An array or map of lines to use as default (at least this many lines, filled by this array, will be presented by default) (map format: [name=>string, readonly=>boolean])
* @param integer $num_required The minimum number of inputs allowed
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param ?string $pattern Custom regex pattern, covers whole field value (null: none)
* @param ?string $pattern_error Custom regex pattern validation error (null: none)
* @return Tempcode The input field
*/
function form_input_region_multi($pretty_name, $description, string $name, array $_default_array, int $num_required, ?int $tabindex = null, ?string $pattern = null, ?string $pattern_error = null) : object
* Get an input for multiple region codes. A new line is added when the prior one isn't blank.This renders as multiple lines of text where region codes can be typed. Additionally, a region selection is rendered at the top which can populate the codes according to country and region name.
*
* @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 base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'.
* @param array $_default_array An array or map of lines to use as default (at least this many lines, filled by this array, will be presented by default) (map format: [name=>string, readonly=>boolean])
* @param integer $num_required The minimum number of inputs allowed
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param ?string $pattern Custom regex pattern, covers whole field value (null: none)
* @param ?string $pattern_error Custom regex pattern validation error (null: none)
* @return Tempcode The input field
*/
function form_input_region_multi($pretty_name, $description, string $name, array $_default_array, int $num_required, ?int $tabindex = null, ?string $pattern = null, ?string $pattern_error = null) : object

