Lea*_*RoR 4 ruby-on-rails-3 simple-form twitter-bootstrap
我想我错过了.示例应用程序的simple_form自举从未表现出如何使用input-append
.我尝试了其他几种方法,但它们没有用.
<div class="controls">
<div class="input-append">
<input type="text" size="16" id="appendedInput" class="span2">
<span class="add-on">.00</span>
</div>
<span class="help-inline">Here's more help text</span>
</div>
Run Code Online (Sandbox Code Playgroud)
我需要这个,所以Bootstrap使用的错误消息显示出来,我能够以某种方式设计我的表单.我将如何使用add-on
和help-inline
一个上水平的形式?
提前致谢!
好的,简单的表单引导程序确实支持它.我应该看着append
就像prepend
.例如:
<%= simple_form_for(@article, :html => { :class => 'form-horizontal' }) do |f| %>
<%= f.input :name, :wrapper => :append, :class => "inline" do %>
<%= f.input_field :name %>
<%= content_tag :span, "?", :class => "add-on abbn" %>
<% end %>
<div class="form-actions">
<%= f.button :submit, :class => 'btn-primary' %>
</div>
<% end %>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3844 次 |
最近记录: |