addTextArea() size setting
- David Matějka
- Moderator | 6445
or using setAttribute method:
$form->addTextArea(...)->setAttribute('rows', 5)
- Phalanx
- Member | 310
It's better to use class rather than style attribute.
<?php
// you can use this latte
{input example, rows => 5, class => 'form-control orSomeOtherClass'}
// or in form init
$form->addTextArea('example', 'Example')->setAttribute('rows', 5)->getControlPrototype()->addClass('form-control');
?>
- radm
- Member | 7
Phalanx wrote:
It's better to use class rather than style attribute.
<?php // you can use this latte {input example, rows => 5, class => 'form-control orSomeOtherClass'} // or in form init $form->addTextArea('example', 'Example')->setAttribute('rows', 5)->getControlPrototype()->addClass('form-control'); ?>
getControlPrototype() and addClass() is what I needed. Thanks!