<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Is it possible for the phone field to auto format when user enters a number?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number</link>
		<description>Gravity Support Forums Topic: Is it possible for the phone field to auto format when user enters a number?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:29:18 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number" rel="self" type="application/rss+xml" />

		<item>
			<title>bamajr on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-80587</link>
			<pubDate>Fri, 12 Oct 2012 12:37:26 +0000</pubDate>
			<dc:creator>bamajr</dc:creator>
			<guid isPermaLink="false">80587@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Dana Cobb&#60;/p&#62;
&#60;p&#62;I appreciate your help and your timely responses. This is an adequate solution for many situations, I'm sure and I'm pretty sure it will work fine for me, after I figure a couple things out.&#60;/p&#62;
&#60;p&#62;FYI: This work around causes problems, if ANY conditional logic is used on the same field.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bamajr on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79722</link>
			<pubDate>Mon, 08 Oct 2012 21:18:04 +0000</pubDate>
			<dc:creator>bamajr</dc:creator>
			<guid isPermaLink="false">79722@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Dana Cobb&#60;/p&#62;
&#60;p&#62;Ok, so I think I have this working...&#60;/p&#62;
&#60;ol&#62;
&#60;li&#62;I put this &#34;add_filter&#34; in my theme's function.php file.&#60;/li&#62;
&#60;li&#62;On line 7 (from the code above), I fill in the Form ID and Field ID from my form.&#60;/li&#62;
&#60;li&#62;I updated line 10 (from the code above) to reflect the desired output - specifically the type=&#34;tel&#34;&#60;/li&#62;
&#60;li&#62;Then save the function.php file and refresh the displayed website.&#60;/li&#62;
&#60;/ol&#62;
&#60;p&#62;Input type=&#34;tel&#34; is now reflected correctly and displays the correct numerical keypad in iOS.&#60;/p&#62;
&#60;p&#62;Just for my own information...&#60;/p&#62;
&#60;ol&#62;
&#60;li&#62;Do you happen to know how long those two recommended filters have existed for Gravity Forms?&#60;/li&#62;
&#60;li&#62;What does the &#34;10, 5&#34; indicate in line 1 of the filter you provided?&#60;/li&#62;
&#60;/ol&#62;
&#60;p&#62;This seems to take care of the input type=&#34;tel&#34; issue, so now, how do I handle the input mask, so that it reflects the same way as the input mask on the &#34;Single Line Text&#34; field?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dana Cobb on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79605</link>
			<pubDate>Mon, 08 Oct 2012 12:04:30 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">79605@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, bamajr,&#60;/p&#62;
&#60;p&#62;You can use the gform_field_input filter (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_input&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_input&#60;/a&#62;) to change the input type of your single line text field to &#34;tel&#34;. Your input mask will still apply to the field as long as you use the same name and id when creating the input field in your filter. You can view your html source to get the proper naming convention. See the example below:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_input&#38;quot;, &#38;quot;change_input_type&#38;quot;, 10, 5);
function change_input_type($input, $field, $value, $lead_id, $form_id) {
    //if it is form id 8 and field id 2 change the input type to tel
    if($form_id == 8 &#38;amp;&#38;amp; $field[&#38;#39;id&#38;#39;] == 2)
    {
	//put id and name for input field into variables for creating the &#38;lt;input&#38;gt; tag
    	$input_id = &#38;quot;input_&#38;quot; . $form_id . &#38;quot;_&#38;quot; . $field[&#38;#39;id&#38;#39;];
    	$input_name = &#38;quot;input_&#38;quot; . $field[&#38;#39;id&#38;#39;];
		//use the variables for input tag id and name in string, include div wrapper so field is formatted
		$input = &#38;#39;&#38;lt;div class=&#38;quot;ginput_container&#38;quot;&#38;gt;&#38;lt;input id=&#38;quot;&#38;#39; . $input_id . &#38;#39;&#38;quot; class=&#38;quot;medium&#38;quot; type=&#38;quot;tel&#38;quot; tabindex=&#38;quot;2&#38;quot; value=&#38;quot;&#38;quot; name=&#38;quot;&#38;#39; .$input_name . &#38;#39;&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;&#38;#39;;
	}
    return $input;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;There is also another filter which allows you to change the field's label along with the input tag called gform_field_content (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_content)&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_content)&#60;/a&#62;. You would use this tag very similarly to the example provided but you need to also include the label tags for the field.&#60;/p&#62;
&#60;p&#62;Take a look; this should get you what you need.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bamajr on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79283</link>
			<pubDate>Sat, 06 Oct 2012 10:43:44 +0000</pubDate>
			<dc:creator>bamajr</dc:creator>
			<guid isPermaLink="false">79283@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, then I guess wee need to see what the developers say. I bought Gravity Forms b/c I've read a lot of positives about it. I think it is great how the Gravity Forms UI is so easy to use, but it seems like something like this, is pretty basic, especially with the implementation of the new HTML5 input types. I do this all the time, when I create my own form elements, so I don't see why I shouldn't be able to do it in Gravity Forms. It seems pretty basic to me.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79232</link>
			<pubDate>Sat, 06 Oct 2012 00:42:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">79232@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Not that I am familiar with.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bamajr on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79230</link>
			<pubDate>Sat, 06 Oct 2012 00:35:23 +0000</pubDate>
			<dc:creator>bamajr</dc:creator>
			<guid isPermaLink="false">79230@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So, at this time, there is no way current option/filter, to apply input masks to the &#34;tel&#34; input type or to over-ride the &#34;Single Line Text&#34; form field, to be the &#34;tel&#34; input type?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79229</link>
			<pubDate>Sat, 06 Oct 2012 00:31:23 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">79229@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've asked the developers for their feedback on your comments.  Expect to hear something back in the beginning of the week.  Our support is closed for the weekend, and for the Columbus Day holiday on Monday as well. Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bamajr on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-79220</link>
			<pubDate>Sat, 06 Oct 2012 00:06:05 +0000</pubDate>
			<dc:creator>bamajr</dc:creator>
			<guid isPermaLink="false">79220@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I too, am using the &#34;Phone&#34; field from the &#34;Advanced Fields&#34; and need to continue using it, as it has a direct correlation to the the UI in an iPhone environment. However, the provided &#34;Phone Format&#34; options are not adequate and are a very bad idea, from a UX (User Experience) standpoint. Correcting a user's input, after the fact, is a terrible, terrible idea, if it can be avoided ahead of time.&#60;/p&#62;
&#60;p&#62;I need the telephone number stored in the format:&#60;br /&#62;
'(999) 999-9999'&#60;br /&#62;
notice the space after the area-code parenthesis?&#60;/p&#62;
&#60;p&#62;I also want to show the user the format as they are typing. &#60;/p&#62;
&#60;p&#62;The format works correctly in the &#34;Single Line Text&#34; field and it shows the user the format as they are populating the field. However, as I eluded to earlier, I need the form's html to include:&#60;/p&#62;
&#60;p&#62;'type=&#34;tel&#34; '&#60;/p&#62;
&#60;p&#62;for use on iPhones. I'm pretty sure masking is allowed on the &#34;tel&#34; input type and I know it defaults to &#34;text&#34; in browsers that don't yet support the &#34;tel&#34; input type.&#60;/p&#62;
&#60;p&#62;How can I accomplish this with Gravity Forms?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>risingrevenue on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-71680</link>
			<pubDate>Mon, 20 Aug 2012 05:15:37 +0000</pubDate>
			<dc:creator>risingrevenue</dc:creator>
			<guid isPermaLink="false">71680@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;No problem, if you go to &#60;a href=&#34;http://fbcreditlaw.com/&#34; rel=&#34;nofollow&#34;&#62;http://fbcreditlaw.com/&#60;/a&#62; the form is on the home page at the top.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Is it possible for the phone field to auto format when user enters a number?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/is-it-possible-for-the-phone-field-to-auto-format-when-user-enters-a-number#post-71506</link>
			<pubDate>Sat, 18 Aug 2012 00:38:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">71506@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@risingrevenue, can you post a link to the form where you have this in use?  Thank you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
