<?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: Validation problem with custom field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field</link>
		<description>Gravity Support Forums Topic: Validation problem with custom field</description>
		<language>en-US</language>
		<pubDate>Sat, 11 Apr 2026 09:35:52 +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/validation-problem-with-custom-field" rel="self" type="application/rss+xml" />

		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-42217</link>
			<pubDate>Sat, 26 Nov 2011 11:17:46 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">42217@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any ideas ? I tried to find out what wasn't good in my code but I can't...&#60;/p&#62;
&#60;p&#62;Any help would be much appreciated.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41931</link>
			<pubDate>Tue, 22 Nov 2011 20:06:51 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">41931@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex,&#60;/p&#62;
&#60;p&#62;Me again ! Thanks again for the Pastie, it really helped me out.&#60;/p&#62;
&#60;p&#62;I have still a question regarding this :&#60;/p&#62;
&#60;p&#62;In the original pastie (&#60;a href=&#34;http://pastie.org/2906268&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2906268&#60;/a&#62;) the first $input variable is empty !&#60;/p&#62;
&#60;p&#62;I can click my button &#34;Facebook Like It !&#34; in the admin and the custom field is displayed.&#60;/p&#62;
&#60;p&#62;If I change the value of my $input into something like this : &#60;a href=&#34;http://pastie.org/2906281&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2906281&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The button &#34;Facebook Like It !&#34; in the admin doesn't work anymore.&#60;/p&#62;
&#60;p&#62;Do you have any idea why ?&#60;/p&#62;
&#60;p&#62;If I need to use it, I have to add the field with the value $input = ''; in my code then change the value of $input once the field is already into the form.&#60;/p&#62;
&#60;p&#62;Thanks again for your time and patience.&#60;/p&#62;
&#60;p&#62;J.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41280</link>
			<pubDate>Wed, 16 Nov 2011 13:34:22 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">41280@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It looks like the problem is related to AJAX being enabled in your form. When AJAX is enabled, some scripts may need to be re-initialized when the page is submitted. The HTML5/javascript integration probably falls under that scenario.&#60;br /&#62;
What I recommend you do is simply disable AJAX for your form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41247</link>
			<pubDate>Wed, 16 Nov 2011 03:48:43 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">41247@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Update :&#60;/p&#62;
&#60;p&#62;When I use HTML5 / JS integration it doesn't work :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$input = &#38;#39;&#38;lt;div class=&#38;quot;fb-like-box&#38;quot; data-href=&#38;quot;http://www.facebook.com/pages/Our-Future-Mobility-Now/172720562818982&#38;quot; data-width=&#38;quot;292&#38;quot; data-height=&#38;quot;150&#38;quot; data-show-faces=&#38;quot;false&#38;quot; data-stream=&#38;quot;false&#38;quot; data-header=&#38;quot;false&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;&#38;#39;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But when I use pure iframe the validation process does not remove the like box :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$input = &#38;#39;&#38;lt;iframe src=&#38;quot;//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FOur-Future-Mobility-Now%2F172720562818982&#38;amp;width=292&#38;amp;height=62&#38;amp;colorscheme=light&#38;amp;show_faces=false&#38;amp;border_color&#38;amp;stream=false&#38;amp;header=false&#38;amp;appId=215129495225503&#38;quot; scrolling=&#38;quot;no&#38;quot; frameborder=&#38;quot;0&#38;quot; style=&#38;quot;border:none; overflow:hidden; width:292px; height:62px;&#38;quot; allowTransparency=&#38;quot;true&#38;quot;&#38;gt;&#38;lt;/iframe&#38;gt;&#38;#39;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any idea why ?&#60;/p&#62;
&#60;p&#62;Thanks again for the support.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41246</link>
			<pubDate>Wed, 16 Nov 2011 03:38:58 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">41246@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex,&#60;/p&#62;
&#60;p&#62;Thanks for your answer ! &#60;/p&#62;
&#60;p&#62;In fact, my custom field will display a Facebook Like Box like here :&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.tkwk.be/client/acea/www/contest-of-the-month/&#34; rel=&#34;nofollow&#34;&#62;http://www.tkwk.be/client/acea/www/contest-of-the-month/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;My code for the custom field : &#60;a href=&#34;http://pastie.org/2871065&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2871065&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The only problem is that after validation it seems that the Facebook Like Box which was containing an iFrame is now empty... I would like to understand why and find a way of fixing this issue.&#60;/p&#62;
&#60;p&#62;Your support is much appreciated.&#60;/p&#62;
&#60;p&#62;Cheers.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41202</link>
			<pubDate>Tue, 15 Nov 2011 18:15:51 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">41202@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There was a small problem with your code when displaying the button in the admin. Following is the code with the fix:&#60;br /&#62;
&#60;a href=&#34;http://pastie.org/2869312&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2869312&#60;/a&#62;&#60;br /&#62;
As far as the field disappearing after validation, I could not replicate it. Following is a screenshot of my form after failing validation. Note the text from your field is still there.&#60;br /&#62;
&#60;a href=&#34;http://grab.by/bfge&#34; rel=&#34;nofollow&#34;&#62;http://grab.by/bfge&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Did I misunderstand the issue?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41151</link>
			<pubDate>Tue, 15 Nov 2011 15:21:38 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">41151@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any one with an idea on how I could fix that ?&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Validation problem with custom field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-problem-with-custom-field#post-41027</link>
			<pubDate>Mon, 14 Nov 2011 12:38:43 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">41027@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello there,&#60;/p&#62;
&#60;p&#62;I added a new field using gform_field_input. This field output a facebook LIKE box.&#60;/p&#62;
&#60;p&#62;Everything works fine until the validation. &#60;/p&#62;
&#60;p&#62;The LIKE box disappear and I would like it to stay on the page.&#60;/p&#62;
&#60;p&#62;Could you please advice me on how I could fix this problem ?&#60;/p&#62;
&#60;p&#62;Here is my code for adding the new field :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_field_input&#38;quot;, &#38;quot;facebooklike_input&#38;quot;, 10, 5);

function facebooklike_input($input, $field, $value, $lead_id, $form_id){

if($field[&#38;quot;type&#38;quot;] == &#38;quot;facebook-like&#38;quot;){

$input = &#38;#39;&#38;#39;;

if (sfc_is_fan()) { // Function developed by Simple Facebook Connect by Otto.

$input .= &#38;#39;You LIKE us on Facebook, your chances are doubled.&#38;#39;;

} else {

$input .= &#38;#39;To double your chance to win, LIKE us on Facebook.&#38;#39;;

}	

} 

return $input;

}

add_filter(&#38;quot;gform_add_field_buttons&#38;quot;, &#38;quot;add_facebooklike_field&#38;quot;);

function add_facebooklike_field($field_groups){

foreach($field_groups as $group){

if($group[&#38;quot;name&#38;quot;] == &#38;quot;advanced_fields&#38;quot;){

$group[&#38;quot;fields&#38;quot;][] = array(&#38;quot;class&#38;quot;=&#38;gt;&#38;quot;button&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;Facebook Like it !&#38;quot;, &#38;quot;onclick&#38;quot; =&#38;gt; &#38;quot;StartAddField(&#38;#39;facebook-like&#38;#39;);&#38;quot;);

break;

}

}

return $field_groups;

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
