Function __global->form_input_radio_entry
Definitions
sources/form_templates.php
- Get the Tempcode for a radio input. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_radio function call).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | string | No | No | required parameter | N/A | N/A | The name of the radio button group this will be put in (i.e. the name the value presented here will be possibly matched against) |
| $value | string | No | No | required parameter | N/A | N/A | The value for this entry |
| $selected | boolean | No | No | False | N/A | N/A | Whether this entry is selected by default or not |
| $text | mixed | No | No | Blank (empty string) | N/A | N/A | The text associated with this choice, provided in HTML format (string or Tempcode) (blank: just use value for text) |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
| $description | mixed | No | No | Blank (empty string) | N/A | N/A | An additional long description, provided in HTML format (string or Tempcode) (blank: no description) |
| $disabled | boolean | No | No | False | N/A | N/A | Whether this radio button is disabled and cannot be selected |
Returns
- The input field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a radio input. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_radio function call).
*
* @param string $name The name of the radio button group this will be put in (i.e. the name the value presented here will be possibly matched against)
* @param string $value The value for this entry
* @param boolean $selected Whether this entry is selected by default or not
* @param mixed $text The text associated with this choice, provided in HTML format (string or Tempcode) (blank: just use value for text)
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param mixed $description An additional long description, provided in HTML format (string or Tempcode) (blank: no description)
* @param boolean $disabled Whether this radio button is disabled and cannot be selected
* @return Tempcode The input field
*/
function form_input_radio_entry(string $name, string $value, bool $selected = false, $text = '', ?int $tabindex = null, $description = '', bool $disabled = false) : object
* Get the Tempcode for a radio input. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_radio function call).
*
* @param string $name The name of the radio button group this will be put in (i.e. the name the value presented here will be possibly matched against)
* @param string $value The value for this entry
* @param boolean $selected Whether this entry is selected by default or not
* @param mixed $text The text associated with this choice, provided in HTML format (string or Tempcode) (blank: just use value for text)
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param mixed $description An additional long description, provided in HTML format (string or Tempcode) (blank: no description)
* @param boolean $disabled Whether this radio button is disabled and cannot be selected
* @return Tempcode The input field
*/
function form_input_radio_entry(string $name, string $value, bool $selected = false, $text = '', ?int $tabindex = null, $description = '', bool $disabled = false) : object
