Function __global->form_input_region

Definitions

sources/locations.php

  • Get a field inputter for a region.
  • 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 The human-readable name for this field (Comcode or Tempcode)
$description mixed No No required parameter N/A N/A The description for this field (Comcode or Tempcode)
$stub ID_TEXT No No required parameter N/A N/A The field name stub
$default ?ID_TEXT No No Null N/A N/A The region ISO code which will be populated in the field by default (null: none)
$required boolean No No False N/A N/A Whether the field is required
$read_only boolean No No False N/A N/A Whether the field cannot be edited
$tabindex ?integer No No Null N/A N/A The tab index for this field (null: determine for us)
$input_size integer No No 10 N/A N/A The size of the field
$autocomplete ~?string No No Null N/A N/A The autocomplete field to use (false: explicitly disable) (null: use the default for this field if applicable)

Returns

  • The field
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a field inputter for a region.
 *
 * @param  mixed $pretty_name The human-readable name for this field (Comcode or Tempcode)
 * @param  mixed $description The description for this field (Comcode or Tempcode)
 * @param  ID_TEXT $stub The field name stub
 * @param  ?ID_TEXT $default The region ISO code which will be populated in the field by default (null: none)
 * @param  boolean $required Whether the field is required
 * @param  boolean $read_only Whether the field cannot be edited
 * @param  ?integer $tabindex The tab index for this field (null: determine for us)
 * @param  integer $input_size The size of the field
 * @param  ~?string $autocomplete The autocomplete field to use (false: explicitly disable) (null: use the default for this field if applicable)
 * @return Tempcode The field
 */

function form_input_region($pretty_name, $description, string $stub, ?string $default = null, bool $required = false, bool $read_only = false, ?int $tabindex = null, int $input_size = 10, $autocomplete = null) : object