Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stopka/nette-forms-checkbox-component
Checkbox with caption in label part as usual for other form controls.
https://github.com/stopka/nette-forms-checkbox-component
Last synced: 13 days ago
JSON representation
Checkbox with caption in label part as usual for other form controls.
- Host: GitHub
- URL: https://github.com/stopka/nette-forms-checkbox-component
- Owner: Stopka
- License: gpl-3.0
- Created: 2020-11-17T21:06:57.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-17T22:07:45.000Z (about 4 years ago)
- Last Synced: 2024-12-20T08:01:14.214Z (15 days ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nette-forms-checkbox-component
CheckboxControl with ability to set caption in label part as usual for other form controls.## Usage
Labels are rendered next to the input as in usual checkbox,
captions are renderd in "label" part of the form (usually on the left)```php
$form = new Form();
$form['checkbox'] = (new CheckboxControl('Some label'))->setCaption('Some caption');
```Optionaly add trait to your form:
```php
class MyForm extends Form{
use CheckboxControlContainerTrait;}
$form = new MyForm();
$form->addExtendedCheckbox('checkbox', 'Some label')
->setCaption('Some caption');
```