Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stopka/nette-forms-html-component
Html component for Nette forms
https://github.com/stopka/nette-forms-html-component
Last synced: about 1 month ago
JSON representation
Html component for Nette forms
- Host: GitHub
- URL: https://github.com/stopka/nette-forms-html-component
- Owner: Stopka
- License: gpl-3.0
- Created: 2020-11-17T19:42:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-17T21:02:26.000Z (about 4 years ago)
- Last Synced: 2024-10-15T13:22:07.543Z (3 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nette-forms-html-component
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
```php
$form = new Form();
$form['html'] = new HtmlControl('Graph', Html::el('img', ['src' => '/graph.jpg']));
```Optionaly add trait to your form:
```php
class MyForm extends Form{
use HtmlControlContainerTrait;}
$form = new MyForm();
$form->addHtml('html', 'Graph', Html::el('img', ['src' => '/graph.jpg']));
```