Sha256: b3b51fc9fb2d45c9ca107ac3f03d54c6d6d3e7bf3f9554fce0dad7714d20a946
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
<%= form_for(@order) do |f| %> <% if @order.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:</h2> <ul> <% @order.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <%= text_field_tag :notes %> <br> <%= text_field_tag :client %> <div class="actions"> <%= f.submit %> </div> <% end %> <br><br> <h2>Simple form:</h2> <%= simple_form_for(@order) do |f| %> <% if @order.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:</h2> <ul> <% @order.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <%= f.input :notes %> <br> <%#= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_orders_url, :items => 2, :minLength=>1, :afterSelect=>'after_select_client' %> <%= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_clients_url %> <%#= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_clients_url, :field_id=>false %> <div class="actions"> <%= f.submit %> </div> <% end %> <script> function after_select_client(item){ console.log('item is selected'); console.log(item); } </script>
Version data entries
4 entries across 4 versions & 1 rubygems