Is there some easy way how put raw HTML tag to label? I have this:
{{ Form::label('firstName', 'First name <em>*</em>', array('class' => 'input_tag')) }}
and it produces:
<label class="input_tag" for="firstName">First Name <em>*</em></label>
BUT tag EM is not interpreted as it should be. What I want is:
<label class="input_tag" for="firstName">First Name <em>*</em></label>
use HTML::decode()
:
{!! HTML::decode(Form::label('firstName', 'First name <em>*</em>', array('class' => 'input_tag'))) !!}
Using sprintf
in a macro
is much faster than redecoding:
Form::macro('rawLabel', function($name, $value = null, $options = array())
{
$label = Form::label($name, '%s', $options);
return sprintf($label, $value);
});
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