Function __global->form_input_dimensions

Definitions

sources/form_templates.php

  • Get the Tempcode for an width/height 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_width ID_TEXT No No required parameter N/A N/A The name which this input field is for: width part
$name_height ID_TEXT No No required parameter N/A N/A The name which this input field is for: height part
$default_width ?integer No No required parameter N/A N/A The default value for this input field: width part (null: no default)
$default_height ?integer No No required parameter N/A N/A The default value for this input field: height part (null: no default)
$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 an width/height 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_width The name which this input field is for: width part
 * @param  ID_TEXT $name_height The name which this input field is for: height part
 * @param  ?integer $default_width The default value for this input field: width part (null: no default)
 * @param  ?integer $default_height The default value for this input field: height part (null: no default)
 * @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_dimensions($pretty_name, $description, string $name_width, string $name_height, ?int $default_width, ?int $default_height, bool $required, ?int $tabindex = null) : object