venca-x/tb3formrenderer

Nette addon for form render Twitter Bootstrap 3

1.1.0 2018-05-03 18:41 UTC

README

Build Status Latest Stable Version Latest Unstable Version Total Downloads License

Nette addon for form render Twitter Bootstrap 3

This package is dpericated. Use: nette-form-renderer

Installation

Add the bundle to your dependencies:

composer require venca-x/tb3formrenderer:~1.0.0

Configuration

$form = new Form();
        
$form->setRenderer( new \Nette\Forms\Rendering\TB3FormRenderer() );
  
/*
//horizontal form
$renderer = $form->getRenderer();
$renderer->wrappers['form']['orientation'] = 'form-horizontal';
//$renderer->wrappers['form']['class'] = 'col-md-6 col-md-offset-3';
*/
  
$form->addSubmit( 'create', 'Přidat novinku' )
    ->setAttribute('class', 'btn btn-primary');