Back to Form class

Method getInput

public string
getInput
(mixed $name, mixed $group = null, mixed $value = null)
Method to get a form field markup for the field input.
Parameters
  • string $name The name of the form field.
  • string $group The optional dot-separated form group path on which to find the field.
  • mixed $value The optional value to use as the default for the field.
Returns
  • string The form field markup.
Since
  • 1.7.0
Class: Form
Project: Joomla

Method getInput - Source code

/**
 * Method to get a form field markup for the field input.
 *
 * @param   string  $name   The name of the form field.
 * @param   string  $group  The optional dot-separated form group path on which to find the field.
 * @param   mixed   $value  The optional value to use as the default for the field.
 *
 * @return  string  The form field markup.
 *
 * @since   1.7.0
 */
public function getInput($name, $group = null, $value = null)
{
    // Attempt to get the form field.
    if ($field = $this->getField($name, $group, $value)) {
        return $field->input;
    }
    return '';
}