Reputation: 6269
I have an simple form:
<%= form_tag icd_test_path, :method => 'get', remote: true do %>
<%= hidden_field_tag(:sicherheit) %>
<%= hidden_field_tag(:id) %>
<%= submit_tag "", :id => 'Scomit' %>
<% end %>
How you can see both text_fields are hidden, now search an way to hide the submit_tag as well?It want the form hidden because its only triggerd by jquery!
Upvotes: 4
Views: 8344
Reputation: 2241
I prefer writing raw HTML in this type situation. It is a lot cleaner.
<input type="submit" id="Scomit" style="display:none">
Upvotes: 0
Reputation: 1297
Adding display none to the submit tag should do the trick.
<%= form_tag icd_test_path, :method => 'get', remote: true do %>
<%= hidden_field_tag(:sicherheit) %>
<%= hidden_field_tag(:id) %>
<%= submit_tag "", :id => 'Scomit', :style => "display: none;" %>
<% end %>
Upvotes: 10