Function __global->form_input_tick

Definitions

sources/form_templates.php

  • Get the Tempcode for a checkbox 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
$ticked boolean No No required parameter N/A N/A Whether this is ticked (checked) by default
$tabindex ?integer No No Null N/A N/A The tab index of the field (null: not specified)
$value ID_TEXT No No 1 N/A N/A The value the checkbox passes when ticked (checked)
$read_only boolean No No False N/A N/A Whether this box should be read only
$disabled boolean No No False N/A N/A Whether this box should be disabled

Returns

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

Preview

Code (PHP)

/**
 * Get the Tempcode for a checkbox 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 $ticked Whether this is ticked (checked) by default
 * @param  ?integer $tabindex The tab index of the field (null: not specified)
 * @param  ID_TEXT $value The value the checkbox passes when ticked (checked)
 * @param  boolean $read_only Whether this box should be read only
 * @param  boolean $disabled Whether this box should be disabled
 * @return Tempcode The input field
 */

function form_input_tick($pretty_name, $description, string $name, bool $ticked, ?int $tabindex = null, string $value = '1', bool $read_only = false, bool $disabled = false) : object