Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide submit_tag button

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!

like image 384
John Smith Avatar asked Sep 21 '25 01:09

John Smith


1 Answers

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 %>
like image 132
kristenmills Avatar answered Sep 22 '25 15:09

kristenmills