尊敬的人...
我在我的 Rails 应用程序中使用 twitter bootstrap 和 simple_form ...我需要在输入字段中获取错误消息,而不是显示在侧面...如下图所示。
我该怎么做呢 ...
我的表格如下
<div class="row-fluid">
<div class="span6 offset3 centered">
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :name, required: true, autofocus: true, wrapper: :prepend, error: true, wrapper_html: { class: 'input-error' } do %>
<span class="add-on"><i class="ss-icon ss-user"></i></span>
<%= f.input_field :name, placeholder: "Full Name" %>
<% end %>
<%= f.input :email, required: true, required: true, wrapper: :prepend, error: true, wrapper_html: { class: 'input-error' } do %>
<span class="add-on"><i class="ss-icon ss-mail"></i></span>
<%= f.input_field :email, placeholder: "Email" %>
<% end %>
<%= f.submit "Sign up", class: "btn btn-primary sign" %>
</div>
<% end %>
</div>
</div>
谢谢 ...