0

如何将跨度添加到使用引导表单 rails gem 生成的引导表单标签。

这是我到目前为止没有运气的尝试:

= bootstrap_form_for resource, url: wizard_path, method: :put, layout: :horizontal do |form|

 = form.select :cover_type, form.object.cover_types, {include_blank: true, label: "Cover Type <span class=fa fa-question-circle hidden-lg hidden-md></span>".html_safe}

谢谢

4

1 回答 1

0

这有什么问题吗?

= bootstrap_form_for resource, url: wizard_path, method: :put, layout: :horizontal do |form|
  = form.label 
    Cover Type 
    %span.fa.fa-question-circle.hidden-lg.hidden-md
  = form.select :cover_type, form.object.cover_types, {include_blank: true}

有什么理由不将标签放在select元素之前?

于 2016-03-02T22:03:46.103 回答