stopka/nette-forms-html-component

Html component for Nette forms

v1.0 2020-11-17 20:59 UTC

This package is auto-updated.

Last update: 2024-03-18 04:32:23 UTC


README

HtmlControl component for Nette forms. Usefull for simple information block or javascript handled entry in the form.

Control value is automatically ommited from form values.

Usage

$form = new Form();
$form['html'] = new HtmlControl('Graph', Html::el('img', ['src' => '/graph.jpg']));

Optionaly add trait to your form:

class MyForm extends Form{
    use HtmlControlContainerTrait;

}

$form = new MyForm();
$form->addHtml('html', 'Graph', Html::el('img', ['src' => '/graph.jpg']));