2 namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
43 parent::initializeArguments();
44 $this->
registerTagAttribute(
'autofocus',
'string',
'Specifies that an input should automatically get focus when the page loads');
45 $this->
registerTagAttribute(
'disabled',
'string',
'Specifies that the input element should be disabled when the page loads');
46 $this->
registerTagAttribute(
'maxlength',
'int',
'The maxlength attribute of the input field (will not be validated)');
51 $this->
registerArgument(
'errorClass',
'string',
'CSS class to set if there are errors for this view helper',
false,
'f3-form-error');
63 public function render($required =
false, $type =
'text')
69 $this->tag->addAttribute(
'type', $type);
70 $this->tag->addAttribute(
'name', $name);
74 if ($value !== null) {
75 $this->tag->addAttribute(
'value', $value);
78 if ($required !==
false) {
79 $this->tag->addAttribute(
'required',
'required');
85 return $this->tag->render();