我写了这段代码:
<%=
form_tag({:action => "simple_search", :method => 'get'}) do
text_field_tag(:searchTextField, "Search by first name")
submit_tag "Search", class: "edit_button"
end
%>
我面临的问题是提交标签正在替换text_field标签,即只显示提交标签,我希望它们都出现。代码有什么问题?
此致
答案 0 :(得分:0)
试试这个:
<%= form_tag({:action => "simple_search", :method => 'get'}) do %>
<%= text_field_tag(:searchTextField, "Search by first name") %>
<%= submit_tag "Search", class: "edit_button" %>
<% end %>