美文网首页
formtastic-bootstrap

formtastic-bootstrap

作者: ibob2012 | 来源:发表于2019-08-24 12:35 被阅读0次

    gem 'formtastic-bootstrap'

    <%= semantic_bootstrap_nested_form_for(@nurse_info) do |f| %>

      <%=f.input:name,:as=>:String,:required=>true,:input_html=>{:onchange=>"makesure()",:onblur=>"checked_changed()"}%>

      <%= f.input :sex, :as=>:radio,:collection=>["女","男"],required=>true%>

      <%= f.inputs '选择题库' do %><%= f.input :exam_storage, :as =>:check_boxes,:colletion=>NurseAid::NurseExamStorage.where(:type_num=>0,:sort_id=>current_admin_user.kf_sort_id)%>

        #显示的是每个数据的name属性

      <%end%><%= f.actions do %>

        <%=f.action:submit,:label=>"确定"%>

        <%= link_to "取消", {:action =>:index},:class=>"btn btn-primary"%>

      <% end %><%end%>

    <%= semantic_bootstrap_nested_form_for @nurse_info,

      :url=>url_for(:page=>params[:page],:id=>@nurse_info.id,:action=>"update")do|f|%>

    相关文章

      网友评论

          本文标题:formtastic-bootstrap

          本文链接:https://www.haomeiwen.com/subject/gsofectx.html