From 98df4983b3ed332a6164f14d2ffc273adf7ca5a8 Mon Sep 17 00:00:00 2001 From: Ray Baxter Date: Sun, 17 Jul 2011 13:22:15 -0700 Subject: Add seach, tel, url and email inputs as 'Other Helpers of Interest' --- railties/guides/source/form_helpers.textile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'railties/guides/source/form_helpers.textile') diff --git a/railties/guides/source/form_helpers.textile b/railties/guides/source/form_helpers.textile index 9051ede9dd..e10620272b 100644 --- a/railties/guides/source/form_helpers.textile +++ b/railties/guides/source/form_helpers.textile @@ -170,12 +170,16 @@ IMPORTANT: Always use labels for each checkbox and radio button. They associate h4. Other Helpers of Interest -Other form controls worth mentioning are the text area, password input and hidden input: +Other form controls worth mentioning are the text area, password input, hidden input, search input, tel input, url input and email input: <%= text_area_tag(:message, "Hi, nice site", :size => "24x6") %> <%= password_field_tag(:password) %> <%= hidden_field_tag(:parent_id, "5") %> +<%= search_field(:user, :name) %> +<%= telephone_field(:user, :phone) %> +<%= url_field(:user, "homepage) %> +<%= email_field(:user, :address) %> output: @@ -184,13 +188,17 @@ output: + + + + -Hidden inputs are not shown to the user, but they hold data like any textual input. Values inside them can be changed with JavaScript. +Hidden inputs are not shown to the user, but they hold data like any textual input. Values inside them can be changed with JavaScript. The search, tel, url and email inputs are specified in HTML5 and may receive special handling and/or formatting +in some user-agents. TIP: If you're using password input fields (for any purpose), you might want to configure your application to prevent those parameters from being logged. - h3. Dealing with Model Objects h4. Model Object Helpers -- cgit v1.2.3 From 4885e5d3ebffa4a95f98dcedfeed9613308377d0 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 19 Jul 2011 23:19:40 +0530 Subject: minor corrections in form helpers guide and api docs --- railties/guides/source/form_helpers.textile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'railties/guides/source/form_helpers.textile') diff --git a/railties/guides/source/form_helpers.textile b/railties/guides/source/form_helpers.textile index e10620272b..96a52af612 100644 --- a/railties/guides/source/form_helpers.textile +++ b/railties/guides/source/form_helpers.textile @@ -177,12 +177,12 @@ Other form controls worth mentioning are the text area, password input, hidden i <%= password_field_tag(:password) %> <%= hidden_field_tag(:parent_id, "5") %> <%= search_field(:user, :name) %> -<%= telephone_field(:user, :phone) %> -<%= url_field(:user, "homepage) %> +<%= telephone_field(:user, :phone) %> +<%= url_field(:user, :homepage) %> <%= email_field(:user, :address) %> -output: +Output: @@ -194,8 +194,7 @@ output: -Hidden inputs are not shown to the user, but they hold data like any textual input. Values inside them can be changed with JavaScript. The search, tel, url and email inputs are specified in HTML5 and may receive special handling and/or formatting -in some user-agents. +Hidden inputs are not shown to the user, but they hold data like any textual input. Values inside them can be changed with JavaScript. The search, tel, url and email inputs are specified in HTML5 and may receive special handling and/or formatting in some user-agents. TIP: If you're using password input fields (for any purpose), you might want to configure your application to prevent those parameters from being logged. -- cgit v1.2.3