Form Class

Create object

Create a object of the Html\Form class:

$form = new Html\Form(Registry $registry, Language $language);

Init

Init the class:

$form->init(array $attributeArray, array $optionArray);

Legend

Append the legend:

$form->legend(string $html, array $attributeArray);

Label

Append the label:

$form->label(string $html, array $attributeArray);

Input

Append the color:

$form->color(array $attributeArray);

Append the checkbox:

$form->checkbox(array $attributeArray);

Append the date:

$form->date(array $attributeArray);

Append the datetime:

$form->datetime(array $attributeArray);

Append the email:

$form->email(array $attributeArray);

Append the file:

$form->file(array $attributeArray);

Append the hidden:

$form->hidden(array $attributeArray);

Append the number:

$form->number(array $attributeArray);

Append the password:

$form->password(array $attributeArray);

Append the radio:

$form->radio(array $attributeArray);

Append the range:

$form->range(array $attributeArray);

Append the search:

$form->search(array $attributeArray);

Append the time:

$form->time(array $attributeArray);

Append the tel:

$form->tel(array $attributeArray);

Append the text:

$form->text(array $attributeArray);

Append the url:

$form->url(array $attributeArray);

Append the week:

$form->week(array $attributeArray);

Textarea

Append the textarea:

$form->textarea(array $attributeArray);

Select

Append the select:

$form->select(array $optionArray, array $selectArray, array $attributeArray);

Select range

Append the select range:

$form->selectRange(array $rangeArray, array $selectArray, array $attributeArray);

Captcha

Append the captcha:

$form->captcha(string $type);

Token

Append the token:

$form->token();

Button

Append the button:

$form->button(string $text, array $attributeArray);

Append the submit:

$form->submit(string $text, array $attributeArray);

Append the reset:

$form->reset(string $text, array $attributeArray);

Html

Set HTML to the form:

$form->html(string $html);

Append

Append HTML to the form:

$form->append(string $html);

Prepend

Prepend HTML to the form:

$form->prepend(string $html);

Clear

Clear HTML of the form:

$form->clear();

Render

Render the form:

$form->render();

Stringify the form:

echo $form;
Edit on GitHub