Function __global->form_input_date_components
Definitions
sources/form_templates.php
- Get the Tempcode for a date component input.
- 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 |
| $want_year | boolean | No | No | required parameter | N/A | N/A | Gather year |
| $want_month | boolean | No | No | required parameter | N/A | N/A | Gather month |
| $want_day | boolean | No | No | required parameter | N/A | N/A | Gather day |
| $start_year | integer | No | No | required parameter | N/A | N/A | Start year in selection range |
| $end_year | integer | No | No | required parameter | N/A | N/A | End year in selection range |
| $default_year | ?integer | No | No | required parameter | N/A | N/A | Default year (null: current year) |
| $default_month | ?integer | No | No | required parameter | N/A | N/A | Default month (null: current month) |
| $default_day | ?integer | No | No | required parameter | N/A | N/A | Default day (null: current day) |
| $required | boolean | No | No | required parameter | N/A | N/A | Whether this is a required input field |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
Returns
- The input field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a date component input.
*
* @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 boolean $want_year Gather year
* @param boolean $want_month Gather month
* @param boolean $want_day Gather day
* @param integer $start_year Start year in selection range
* @param integer $end_year End year in selection range
* @param ?integer $default_year Default year (null: current year)
* @param ?integer $default_month Default month (null: current month)
* @param ?integer $default_day Default day (null: current day)
* @param boolean $required Whether this is a required input field
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @return Tempcode The input field
*/
function form_input_date_components($pretty_name, $description, string $name, bool $want_year, bool $want_month, bool $want_day, int $start_year, int $end_year, ?int $default_year, ?int $default_month, ?int $default_day, bool $required, ?int $tabindex = null) : object
* Get the Tempcode for a date component input.
*
* @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 boolean $want_year Gather year
* @param boolean $want_month Gather month
* @param boolean $want_day Gather day
* @param integer $start_year Start year in selection range
* @param integer $end_year End year in selection range
* @param ?integer $default_year Default year (null: current year)
* @param ?integer $default_month Default month (null: current month)
* @param ?integer $default_day Default day (null: current day)
* @param boolean $required Whether this is a required input field
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @return Tempcode The input field
*/
function form_input_date_components($pretty_name, $description, string $name, bool $want_year, bool $want_month, bool $want_day, int $start_year, int $end_year, ?int $default_year, ?int $default_month, ?int $default_day, bool $required, ?int $tabindex = null) : object

