<?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: Custom field with Facebook Like</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-field-with-facebook-like</link>
		<description>Gravity Support Forums Topic: Custom field with Facebook Like</description>
		<language>en-US</language>
		<pubDate>Sat, 11 Apr 2026 06:03: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/custom-field-with-facebook-like" rel="self" type="application/rss+xml" />

		<item>
			<title>Jacques Letesson on "Custom field with Facebook Like"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-with-facebook-like#post-40740</link>
			<pubDate>Thu, 10 Nov 2011 13:01:34 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">40740@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok I just realize that I made a mistake, I replace  sfc_like_button(); by a HTML5 Like box.&#60;/p&#62;
&#60;p&#62;It works properly now.&#60;/p&#62;
&#60;p&#62;My two questions here remains unanswered tough :-) : &#60;/p&#62;
&#60;p&#62;Then I would like to add a value on submit to check if the user has LIKE or NOT the page before submitting it… Any advice on how I can do that ?&#60;/p&#62;
&#60;p&#62;How should I create custom field properties… ? Is there a filter for that ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jacques Letesson on "Custom field with Facebook Like"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-with-facebook-like#post-40732</link>
			<pubDate>Thu, 10 Nov 2011 12:20:04 +0000</pubDate>
			<dc:creator>Jacques Letesson</dc:creator>
			<guid isPermaLink="false">40732@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi guys,&#60;/p&#62;
&#60;p&#62;I'm new to Gravity Form but I already love it :-) !&#60;/p&#62;
&#60;p&#62;Here is what I'm trying to achieve.&#60;/p&#62;
&#60;p&#62;I want to build up a form (name, firstname, email, checkbox) that will display a FACEBOOK LIKE button just before the SUBMIT button. This form will be use to subscribe to a contest. If you subscribe and LIKE the fan page of my client, you will have two chance to win something (if you don't like, only one...).&#60;/p&#62;
&#60;p&#62;So I decided to add a custom field. I used &#60;code&#62;gform_add_field_buttons&#60;/code&#62; to insert a button on the editor.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
add_filter(&#34;gform_add_field_buttons&#34;, &#34;add_facebooklike_field&#34;);&#60;br /&#62;
function add_facebooklike_field($field_groups){&#60;/p&#62;
&#60;p&#62;    foreach($field_groups as &#38;amp;$group){&#60;br /&#62;
        if($group[&#34;name&#34;] == &#34;advanced_fields&#34;){&#60;br /&#62;
            $group[&#34;fields&#34;][] = array(&#34;class&#34;=&#38;gt;&#34;button&#34;, &#34;value&#34; =&#38;gt; &#34;Facebook Like it !&#34;, &#34;onclick&#34; =&#38;gt; &#34;StartAddField('facebook-like');&#34;);&#60;br /&#62;
            break;&#60;br /&#62;
        }&#60;br /&#62;
    }&#60;br /&#62;
    return $field_groups;&#60;br /&#62;
}&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Then I used &#60;code&#62;gform_field_input&#60;/code&#62; to display the good input.&#60;/p&#62;
&#60;p&#62;I use the wonderful Simple Facebook Connect by Otto to do all my facebook stuff.&#60;/p&#62;
&#60;p&#62;The problem is that the button appears in the editor but not on my form preview.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
add_action(&#34;gform_field_input&#34;, &#34;facebooklike_input&#34;, 10, 5);&#60;br /&#62;
function facebooklike_input($input, $field, $value, $lead_id, $form_id){&#60;br /&#62;
echo $field[&#34;type&#34;];&#60;br /&#62;
  if($field[&#34;type&#34;] == &#34;facebook-like&#34;){&#60;br /&#62;
    	$input = sfc_like_button();&#60;br /&#62;
	}&#60;br /&#62;
	return $input;&#60;br /&#62;
}&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;How can I fix that ?&#60;/p&#62;
&#60;p&#62;Then I would like to add a value on submit to check if the user has LIKE or NOT the page before submitting it… Any advice on how I can do that ?&#60;/p&#62;
&#60;p&#62;How should I create custom field properties… ? Is there a filter for that ?&#60;/p&#62;
&#60;p&#62;Thanks in advance for your time and patience.&#60;/p&#62;
&#60;p&#62;Jk_
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
