【问题标题】:Group inputs in control-group with Formtastic-Boostrap使用 Formtastic-Bootstrap 对控制组中的输入进行分组
【发布时间】:2012-07-16 20:59:38
【问题描述】:

我将 Formtastic 与 Bootstrap formbuilder 一起使用。我不知道如何将多个输入添加到对照组中,例如:

对我来说合乎逻辑的事情是执行以下操作(我正在使用 HAML):

= f.inputs do
      = f.input :city, :input_html=>{:class=>'input-small'}, :label=>false, :placeholder=>'City'
      = f.input :state, :input_html=>{:class=>'input-small'}, :label=>false, :placeholder=>'State'
      = f.input :zip, :input_html=>{:class=>'input-small'}, :label=>false, :placeholder=>'Zip'

但这只是将控件分组到一个字段集中。

我在文档中没有看到任何关于此的内容,Google 也没有提供太多帮助。有人可以帮忙吗?

【问题讨论】:

    标签: ruby-on-rails twitter-bootstrap formtastic


    【解决方案1】:

    我最终使用了默认的 Rails 表单构建器来处理需要相邻输入的区域。

    【讨论】:

      猜你喜欢
      • 2012-12-04
      • 2014-10-17
      • 2017-11-13
      • 1970-01-01
      • 2017-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-24
      相关资源
      最近更新 更多