I am trying to add classes and ids to specific elements of a form in Laravel 4. For example, I would like this:
<textarea type="text" id="description" onfocus="this.value=''; setbg('#f0f7f8');" onblur="setbg('white')" name="description" value="" rows="10"></textarea>
to be applied to:
{{ Form::label('description', 'Description:') }}
{{ Form::textarea('description')}}
I didn't see this in the documentation. Thank you!
Use the third parameter for the Form::textarea
method, passing a key-value array. Ex:
Form::textarea('description', null, [
'id' => 'description',
'rows' => 10,
]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With