Function __global->form_input_mail_template

Definitions

sources/form_templates.php

  • Create a list entry for a mail template.This will instead return a hidden field if only the default template exists.
  • 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
$default ?string No No required parameter N/A N/A The selected value by default (null: the configured default template)
$inline_list boolean No No False N/A N/A Whether this is an inline displayed list as opposed to a dropdown
$required boolean No No True N/A N/A Whether this is required

Returns

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

Preview

Code (PHP)

/**
 * Create a list entry for a mail template.This will instead return a hidden field if only the default template exists.
 *
 * @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  ?string $default The selected value by default (null: the configured default template)
 * @param  boolean $inline_list Whether this is an inline displayed list as opposed to a dropdown
 * @param  boolean $required Whether this is required
 * @return Tempcode The field
 */

function form_input_mail_template($pretty_name, $description, string $name, ?string $default, bool $inline_list = false, bool $required = true) : object