<%= simple_form_for(@widget, :html=>{:id=>"frm_create_widget",:class=> "form-horizontal form-label-left"}, :url=>@url_path) do |f| %>

Edit Widget - <%=@widget.name%><%= f.submit :Save , class: 'btn btn-success btn-sm pull-right'%>

<%= f.input :name, input_html: { class: 'form-control col-md-7 col-xs-12'} , label: false %>
<%= f.input :title, input_html: { class: 'form-control col-md-7 col-xs-12'} , label: false %>
<%= f.input :file_name, input_html: { class: 'form-control col-md-7'} , label: false %>
<%= f.input :size_type, :collection => [['Full', "full"],['Half', "half"],['One Third', "one-third"],['One Fourth', "one-fourth"]], label:false, :include_blank=>'-Select-',input_html: { class: 'select2 form-control '} %>
<%= f.input :module, :collection => APP_CONFIG['tools'].map{|t,n| [n,t]}, label:false, :include_blank=>'-Select Tool-',input_html: { class: 'select2 form-control '} %>
<%= f.input :widget_type, :collection => [['Live', "live"],['Historical', "historical"]], label:false, :include_blank=>false,input_html: { class: 'select2 form-control '} %>
<% if @widget.filters.present? %> <% @widget.filters.each_with_index do |filter,key| %>
<%= (@widget.errors[:"filter_title_#{key}"].present?) ? raw(''+@widget.errors[:"filter_title_#{key}"].join("")+'') : '' %>
<%= (@widget.errors[:"filter_type_#{key}"].present?) ? raw(''+@widget.errors[:"filter_type_#{key}"].join("")+'') : '' %>
<%= (@widget.errors[:"filter_count_#{key}"].present?) ? raw(''+@widget.errors[:"filter_count_#{key}"].join("")+'') : '' %>
<% end %> <% else %>
<% end %>
<% end %>