Skip to content

Commit

Permalink
doc for more input tag types
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishnu Atrai committed Jun 29, 2013
1 parent 1f35f04 commit f559982
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions guides/source/action_view_overview.md
Expand Up @@ -1006,6 +1006,24 @@ text_field(:post, :title)
# => <input type="text" id="post_title" name="post[title]" value="#{@post.title}" />
```

#### email_field

Returns an input tag of the "email" type tailored for accessing a specified attribute.

```ruby
email_field(:user, :email)
# => <input type="email" id="user_email" name="user[email]" value="#{@user.email}" />
```

#### url_field

Returns an input tag of the "url" type tailored for accessing a specified attribute.

```ruby
url_field(:user, :url)
# => <input type="url" id="user_url" name="user[url]" value="#{@user.url}" />
```

### FormOptionsHelper

Provides a number of methods for turning different kinds of containers into a set of option tags.
Expand Down Expand Up @@ -1372,6 +1390,24 @@ text_field_tag 'name'
# => <input id="name" name="name" type="text" />
```

#### email_field_tag

Creates a standard input field of email type.

```ruby
email_field_tag 'email'
# => <input id="email" name="email" type="email" />
```

#### url_field_tag

Creates a standard input field of url type.

```ruby
url_field_tag 'url'
# => <input id="url" name="url" type="url" />
```

#### date_field_tag

Creates a standard input field of date type.
Expand Down

0 comments on commit f559982

Please sign in to comment.