Skip to content
This repository
Browse code

doc for more input tag types

  • Loading branch information...
commit f5599826d4e88f9ae991a5a515668d241bff9325 1 parent 1f35f04
Vishnu Atrai vatrai authored

Showing 1 changed file with 36 additions and 0 deletions. Show diff stats Hide diff stats

  1. +36 0 guides/source/action_view_overview.md
36 guides/source/action_view_overview.md
Source Rendered
@@ -1006,6 +1006,24 @@ text_field(:post, :title)
1006 1006 # => <input type="text" id="post_title" name="post[title]" value="#{@post.title}" />
1007 1007 ```
1008 1008
  1009 +#### email_field
  1010 +
  1011 +Returns an input tag of the "email" type tailored for accessing a specified attribute.
  1012 +
  1013 +```ruby
  1014 +email_field(:user, :email)
  1015 +# => <input type="email" id="user_email" name="user[email]" value="#{@user.email}" />
  1016 +```
  1017 +
  1018 +#### url_field
  1019 +
  1020 +Returns an input tag of the "url" type tailored for accessing a specified attribute.
  1021 +
  1022 +```ruby
  1023 +url_field(:user, :url)
  1024 +# => <input type="url" id="user_url" name="user[url]" value="#{@user.url}" />
  1025 +```
  1026 +
1009 1027 ### FormOptionsHelper
1010 1028
1011 1029 Provides a number of methods for turning different kinds of containers into a set of option tags.
@@ -1372,6 +1390,24 @@ text_field_tag 'name'
1372 1390 # => <input id="name" name="name" type="text" />
1373 1391 ```
1374 1392
  1393 +#### email_field_tag
  1394 +
  1395 +Creates a standard input field of email type.
  1396 +
  1397 +```ruby
  1398 +email_field_tag 'email'
  1399 +# => <input id="email" name="email" type="email" />
  1400 +```
  1401 +
  1402 +#### url_field_tag
  1403 +
  1404 +Creates a standard input field of url type.
  1405 +
  1406 +```ruby
  1407 +url_field_tag 'url'
  1408 +# => <input id="url" name="url" type="url" />
  1409 +```
  1410 +
1375 1411 #### date_field_tag
1376 1412
1377 1413 Creates a standard input field of date type.

0 comments on commit f559982

Please sign in to comment.
Something went wrong with that request. Please try again.