Function __global->form_input_list_entry

Definitions

sources/templates.php

  • Get the Tempcode for a list entry. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_list 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
$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 (Note: if nothing else is selected and this is the first, it will be selected by default anyway)
$text mixed No No Blank (empty string) N/A N/A The text associated with this choice, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode) (blank: just use name for text)
$red boolean No No False N/A N/A Whether this entry will be put as red (marking it as important somehow)
$disabled boolean No No False N/A N/A Whether this list entry is disabled (like a header in a list)
$title string No No Blank (empty string) N/A N/A The tooltip

Returns

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

Preview

Code (PHP)

/**
 * Get the Tempcode for a list entry. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_list function call).
 *
 * @param  string $value The value for this entry
 * @param  boolean $selected Whether this entry is selected by default or not (Note: if nothing else is selected and this is the first, it will be selected by default anyway)
 * @param  mixed $text The text associated with this choice, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode) (blank: just use name for text)
 * @param  boolean $red Whether this entry will be put as red (marking it as important somehow)
 * @param  boolean $disabled Whether this list entry is disabled (like a header in a list)
 * @param  string $title The tooltip
 * @return Tempcode The input field
 */

function form_input_list_entry(string $value, bool $selected = false, $text = '', bool $red = false, bool $disabled = false, string $title = '') : object