如何在使用bootstrap form rails gems生成的引导程序表单标签中添加span。
这是我迄今为止没有运气的尝试:
= 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}
由于
答案 0 :(得分: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
元素之前的任何原因?