<?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: Placeholder text breaking on AJAX validation</title>
		<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation</link>
		<description>Gravity Support Forums Topic: Placeholder text breaking on AJAX validation</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 09:40:05 +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/placeholder-text-breaking-on-ajax-validation" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-72700</link>
			<pubDate>Sun, 26 Aug 2012 23:17:08 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72700@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That's not a bad way of doing it.  Thanks for posting your solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Mastal on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-72665</link>
			<pubDate>Sun, 26 Aug 2012 18:28:11 +0000</pubDate>
			<dc:creator>Mastal</dc:creator>
			<guid isPermaLink="false">72665@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Until the gravity team adds this feature, I did a workaround really really ugly but that works for me:&#60;/p&#62;
&#60;p&#62;On field description i added some like this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;This description will be shown.&#38;lt;span class=&#38;quot;example&#38;quot;&#38;gt;http://google.com&#38;lt;/span&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Add the CSS rule to hide it:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;.gform_wrapper .example {
    display: none;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Add this to functions.php, to make it works with ajax forms:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_pre_render&#38;#39;, &#38;#39;tuneUpElements&#38;#39;);
function tuneUpElements($form) {
    $script = &#38;#39;tuneUpElements();&#38;#39;;

    GFFormDisplay::add_init_script($form[&#38;#39;id&#38;#39;], &#38;#39;tuneUpElements&#38;#39;, GFFormDisplay::ON_PAGE_RENDER, $script);

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And finally this javascript function:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$(&#38;#39;.gfield&#38;#39;).each(function(){
    if( $(this).find(&#38;#39;.example&#38;#39;).length != 0 ) {
        $(this).find(&#38;#39;input&#38;#39;).attr(&#38;#39;placeholder&#38;#39;,$(this).find(&#38;#39;.example&#38;#39;).text());
    }
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;As I said, Im not proud about this way to add placeholders, but is the best that i have found.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-66858</link>
			<pubDate>Wed, 18 Jul 2012 11:37:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66858@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Scott, I replied to your email.  Once we resolve this issue we can post the solution here.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>KingScooty on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-66839</link>
			<pubDate>Wed, 18 Jul 2012 10:36:47 +0000</pubDate>
			<dc:creator>KingScooty</dc:creator>
			<guid isPermaLink="false">66839@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've responded to your email. The issue wasn't the protocol related URLS.&#60;/p&#62;
&#60;p&#62;The following hook:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_enqueue_scripts&#38;#39;,&#38;quot;my_gform_enqueue_scripts&#38;quot;, 10, 2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Seems to be injecting my jQuery scripts to the very top of wp_head();&#60;br /&#62;
Obviously by doing that, it's executing before the Wordpress implementation of jQuery has even loaded.&#60;/p&#62;
&#60;p&#62;I've changed the hook priority below and above 10, but nothing happens. Is there a way to shift it's position in wp_head() to execute after jQuery has loaded?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-66599</link>
			<pubDate>Tue, 17 Jul 2012 00:49:28 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66599@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Scott, I emailed you.  I have a &#34;jQuery is not defined&#34; error after submitting an incomplete form. That's when the placeholder text goes missing.  Please see the email.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>KingScooty on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-66350</link>
			<pubDate>Sun, 15 Jul 2012 18:01:12 +0000</pubDate>
			<dc:creator>KingScooty</dc:creator>
			<guid isPermaLink="false">66350@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, i've put the code online, and sent you a link to the page, along with the functions.php file to your email address.&#60;/p&#62;
&#60;p&#62;Eagerly, and excitedly, awaiting your reply!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-65916</link>
			<pubDate>Thu, 12 Jul 2012 07:51:28 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">65916@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you export the form you are working with and email it to &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; - include any additional code you're using to make this work.  Without seeing your form it will be difficult to help you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>KingScooty on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-65911</link>
			<pubDate>Thu, 12 Jul 2012 06:11:08 +0000</pubDate>
			<dc:creator>KingScooty</dc:creator>
			<guid isPermaLink="false">65911@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm not really in a good position to upload my project at the moment. However, i'm using the gravity form plugin, along with the functions.php code from this article: &#60;a href=&#34;http://www.wpbeginner.com/wp-tutorials/how-to-add-placeholder-text-in-gravity-forms/&#34; rel=&#34;nofollow&#34;&#62;http://www.wpbeginner.com/wp-tutorials/how-to-add-placeholder-text-in-gravity-forms/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I'd really appreciate it if you can take a look. I was using contact form 7, which natively supported placeholders, but i switched to gravity to make the experience for the client a lot more enjoyable.&#60;/p&#62;
&#60;p&#62;Sadly i *need* placeholders to work - they're in the designs that have been signed off. &#60;/p&#62;
&#60;p&#62;I'd really hate to be forced to switch back after purchasing a license for this.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-64834</link>
			<pubDate>Thu, 05 Jul 2012 07:50:24 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">64834@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you post a link to a Gravity Form where this behaviour can be seen?  Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>KingScooty on "Placeholder text breaking on AJAX validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/placeholder-text-breaking-on-ajax-validation#post-64793</link>
			<pubDate>Wed, 04 Jul 2012 15:50:34 +0000</pubDate>
			<dc:creator>KingScooty</dc:creator>
			<guid isPermaLink="false">64793@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Every solution i've tried works until the gravity form is submitted. If the validation triggers and requires more fields to be populated, all the input placeholders disappear and the labels reappear.&#60;/p&#62;
&#60;p&#62;It's really frustrating me as there should be a simple way to keep the placeholders in the input fields.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
