We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 13d5f87 + c97abd5 commit 35533c1Copy full SHA for 35533c1
guides/source/form_helpers.md
@@ -56,7 +56,7 @@ Here is how to create a search form with `form_with`:
56
```erb
57
<%= form_with url: "/search", method: :get do |form| %>
58
<%= form.label :query, "Search for:" %>
59
- <%= form.text_field :query %>
+ <%= form.search_field :query %>
60
<%= form.submit "Search" %>
61
<% end %>
62
```
@@ -66,7 +66,7 @@ This will generate the following HTML:
66
```html
67
<form action="/search" accept-charset="UTF-8" method="get">
68
<label for="query">Search for:</label>
69
- <input type="text" name="query" id="query">
+ <input type="search" name="query" id="query">
70
<input type="submit" name="commit" value="Search" data-disable-with="Search">
71
</form>
72
0 commit comments