hidden.php
Go to the documentation of this file.
1 <?php
10 namespace depage\htmlform\elements;
11 
36 class hidden extends text
37 {
43  public function __toString()
44  {
45  $formName = $this->htmlFormName();
46  $classes = $this->htmlClasses();
47  $value = $this->htmlValue();
48 
49  return "<input name=\"{$this->name}\" id=\"{$formName}-{$this->name}\" type=\"{$this->type}\" class=\"{$classes}\" value=\"{$value}\">\n";
50  }
51 }
52 
53 /* vim:set ft=php sw=4 sts=4 fdm=marker et : */
$classes
HTML classes attribute for rendering the input element.
Definition: input.php:112
$formName
Name of the parent HTML form. Used to identify the element once it&#39;s rendered.
Definition: input.php:74
__toString()
Renders element to HTML.
Definition: hidden.php:43
HTML text input type.
Definition: text.php:38
HTML hidden input type.
Definition: hidden.php:36
htmlValue()
Returns HTML-rendered element value.
Definition: input.php:504
$value
Input elements&#39;s value.
Definition: input.php:79
htmlClasses()
Returns string of the elements&#39; HTML-classes, separated by spaces.
Definition: input.php:414