Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
With all this nifty fashion for icon fonts you probably want to add some icon to your label in Drupal webform module. The only issue is that by default webform would strip majority of HTML tags for security reasons. But it is quite simple to override those restrictions.
As you can see, by default it would only allow
'a', 'em', 'strong', 'code', 'img'
(http://drupalcontrib.org/api/drupal/contributions!webform!webform.module...). To override just add a string to your site settings.php something like this:
$conf['webform_allowed_tags'] = array('a', 'em', 'strong', 'code', 'img', 'i');
Now you can set a label to something like
<i class="fa fa-user"></i> First Name
if you use fontawesome.
Have fun with icons now!
And of course you can override default settings of many module pretty much the same way.
Bình luận (0)
Add Comment