datetimelocal.php
Go to the documentation of this file.
1 <?php
10 namespace depage\htmlform\elements;
11 
17 class datetimelocal extends text
18 {
26  public function __toString()
27  {
28  $wrapperAttributes = $this->htmlWrapperAttributes();
29  $label = $this->htmlLabel();
30  $marker = $this->htmlMarker();
31  $value = $this->htmlValue();
32  $inputAttributes = $this->htmlInputAttributes();
34  $helpMessage = $this->htmlHelpMessage();
35 
36  return "<p {$wrapperAttributes}>" .
37  "<label>" .
38  "<span class=\"depage-label\">{$label}{$marker}</span>" .
39  "<input name=\"{$this->name}\" type=\"datetime-local\"{$inputAttributes} value=\"{$value}\">" .
40  "</label>" .
42  $helpMessage .
43  "</p>\n";
44  }
45 }
46 
47 /* vim:set ft=php sw=4 sts=4 fdm=marker et : */
__toString()
Renders element to HTML.
htmlWrapperAttributes()
Returns string of HTML attributes for element wrapper paragraph.
Definition: input.php:486
htmlMarker()
Returns elements&#39; required-indicator.
Definition: input.php:445
htmlErrorMessage()
Returns HTML-rendered error message.
Definition: input.php:514
HTML text input type.
Definition: text.php:38
htmlValue()
Returns HTML-rendered element value.
Definition: input.php:504
htmlHelpMessage()
Returns HTML-rendered helpMessage.
Definition: input.php:533
$value
Input elements&#39;s value.
Definition: input.php:79
$label
Input element - HTML label.
Definition: input.php:36
htmlInputAttributes()
renders text element specific HTML attributes
Definition: text.php:142
$errorMessage
Message that gets displayed in case of invalid input.
Definition: input.php:173
$helpMessage
Extra help message.
Definition: input.php:185
$marker
Input element - HTML marker text that marks required fields.
Definition: input.php:47
HTML datetime-local input type.