Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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');
```