42 parent::initializeArguments();
43 $this->
registerTagAttribute(
'autofocus',
'string',
'Specifies that a input should automatically get focus when the page loads');
44 $this->
registerTagAttribute(
'disabled',
'string',
'Specifies that the input element should be disabled when the page loads');
45 $this->
registerTagAttribute(
'maxlength',
'int',
'The maxlength attribute of the input field (will not be validated)');
49 $this->
registerArgument(
'errorClass',
'string',
'CSS class to set if there are errors for this view helper', FALSE,
'f3-form-error');
61 public function render($required = NULL, $type =
'text') {
65 $this->tag->addAttribute(
'type', $type);
66 $this->tag->addAttribute(
'name', $name);
70 if ($value !== NULL) {
71 $this->tag->addAttribute(
'value', $value);
74 if ($required !== NULL) {
75 $this->tag->addAttribute(
'required',
'required');
80 return $this->tag->render();
registerTagAttribute($name, $type, $description, $required=FALSE, $default=NULL)
registerArgument($name, $type, $description, $required=FALSE, $defaultValue=NULL)
render($required=NULL, $type='text')
registerUniversalTagAttributes()