Adding a class ID to or change the ID of any Form or HTML helper created element can be done like so:
Code: Select all
<?php echo Form::text('name', array('value' => $user->name, 'class' => "form-control", 'id' => "users_name")); ?>
Most, if not all, HTML and Form helper methods can have classes added to them this way. For example, the "Form::text(...)
" method is a shortcut to the "Form::input(...)
" method just like most of the other form helper methods, so it's exactly the same as the above.
Documentation for classes and functions for Traq 3.x and its framework is, well, complete crap. This however will be changing with Traq 4.0. Until then, hopefully the docblocks and code comments will be able to help, even if only a little.