Hướng dẫn thêm icons cho webform Drupal module

Hướng dẫn thêm icons cho webform Drupal module

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ạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Khanh Hoang

Khanh Hoang - Kenn

Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.

Bình luận (0)

 

Add Comment

Filtered HTML

  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Các thẻ HTML được chấp nhận: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Tự động ngắt dòng và đoạn văn.

Plain text

  • No HTML tags allowed.
  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Tự động ngắt dòng và đoạn văn.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Thuê bao VinaPhone đã sử dụng được trên máy bay

Thuê bao VinaPhone đã sử dụng được trên máy bay

Ngày 12/7, VinaPhone đã chính thức cung cấp dịch vụ gọi điện thoại hoặc nhắn tin khi đang bay trên một số tuyến bay quốc tế. Hiện tại, dịch vụ này mới chỉ triển khai dành cho thuê bao trả sau.

Giới thiệu RDF UI (Schema.org Mappings), cài đặt trong Drupal 8 năm 2015

Giới thiệu RDF UI (Schema.org Mappings), cài đặt trong Drupal 8 năm 2015

RDF UI can be easily installed using the Drush command line tool for Drupal

Tại sao cần phải sửa chữa về Accessibility của website

Tại sao cần phải sửa chữa về Accessibility của website

I was amazed and slightly horrified. At the time, I was a web developer working for a federally funded non profit

Công ty diệt chuột T&C

 

Diet con trung