<?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 fields and save value</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-fields-and-save-value</link>
		<description>Gravity Support Forums Topic: Custom fields and save value</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 10:05:01 +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-fields-and-save-value" rel="self" type="application/rss+xml" />

		<item>
			<title>giro on "Custom fields and save value"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-fields-and-save-value#post-53021</link>
			<pubDate>Wed, 21 Mar 2012 04:55:02 +0000</pubDate>
			<dc:creator>giro</dc:creator>
			<guid isPermaLink="false">53021@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I create a new custom field, that I can use in form editor, and that I see on forms. But any of this values are saved in entries, and not received in hooks.&#60;/p&#62;
&#60;p&#62;This is the code that I use to create button.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_field_input&#38;quot;, &#38;quot;interes_checkbox&#38;quot;, 10, 5);

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

	global $wp;
    if($field[&#38;quot;type&#38;quot;] == &#38;quot;custominteres&#38;quot;)
    {
    	// mostrara checkboxes en 3 columnes respecte a la taxonomia interes.
    	if(IS_ADMIN)
    	{
    		$input = &#38;quot;Categories taxonomies inter&#38;amp;eacute;s&#38;quot;;
    	}
    	else {

    	$input = &#38;quot;&#38;lt;div class=\&#38;quot;ginput_container\&#38;quot;&#38;gt;\n&#38;quot;;
    	$input .= &#38;quot;&#38;lt;ul class=\&#38;quot;gfield_checkbox\&#38;quot; id=\&#38;quot;input_&#38;quot;.$field[&#38;#39;formId&#38;#39;].&#38;quot;_&#38;quot;.$field[&#38;#39;id&#38;#39;].&#38;quot;\&#38;quot;&#38;gt;\n&#38;quot;;
    	$taxonomies= get_terms(&#38;#39;interes&#38;#39;,&#38;#39;orderby=count&#38;amp;hide_empty=0&#38;#39;);
    	$indx_li = 1;
    	foreach ($taxonomies as $ataxo)
    	{
    		$input.=&#38;quot;&#38;lt;li class=\&#38;quot;gchoice_&#38;quot;.$field[&#38;#39;id&#38;#39;].&#38;quot;_&#38;quot;.$indx_li.&#38;quot;\&#38;quot;&#38;gt;&#38;quot;;
    		$input.=&#38;quot;&#38;lt;input name=\&#38;quot;input_&#38;quot;.$field[&#38;#39;id&#38;#39;].&#38;quot;.&#38;quot;.$indx_li.&#38;quot;\&#38;quot; type=\&#38;quot;checkbox\&#38;quot; value=\&#38;quot;&#38;quot;.$ataxo-&#38;gt;term_id.&#38;quot;\&#38;quot; id=\&#38;quot;choice_&#38;quot;.$field[&#38;#39;id&#38;#39;].&#38;quot;_&#38;quot;.$indx_li.&#38;quot;\&#38;quot;&#38;gt;&#38;quot;;
    		$input .= &#38;quot;&#38;lt;label for=\&#38;quot;choice_&#38;quot;.$field[&#38;#39;id&#38;#39;].&#38;quot;_&#38;quot;.$indx_li.&#38;quot;\&#38;quot;&#38;gt;&#38;quot;.$ataxo-&#38;gt;name.&#38;quot;&#38;lt;/label&#38;gt;&#38;quot;;
    		$input.=&#38;quot;&#38;lt;/li&#38;gt;&#38;quot;;
    		$indx_li++ ;
    	}
    	$input .= &#38;quot;&#38;lt;/ul&#38;gt;&#38;quot;;
    	$input .= print_r($value,true);
    	$input .= print_r($field,true);
    	$input .= &#38;quot;&#38;lt;/div&#38;gt;&#38;quot;;
    	}

    }

    return $input;
}

function add_clist_field($field_groups){

	// Custom Fields Group
	$field_groups[] = array(
		&#38;#39;name&#38;#39; =&#38;gt; &#38;#39;custom_interes&#38;#39;,
		&#38;#39;label&#38;#39; =&#38;gt; &#38;#39;Extras&#38;#39;,
		&#38;#39;fields&#38;#39; =&#38;gt; array(
			array(
				&#38;#39;class&#38;#39; =&#38;gt; &#38;#39;button&#38;#39;,
				&#38;#39;value&#38;#39; =&#38;gt; &#38;#39;Interes&#38;#39;,
				&#38;#39;onclick&#38;#39; =&#38;gt; &#38;quot;StartAddField(&#38;#39;custominteres&#38;#39;);&#38;quot;
			)
		)
	);
    return $field_groups;
}
add_filter(&#38;quot;gform_add_field_buttons&#38;quot;, &#38;quot;add_clist_field&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;All work correct but not checkbox values saved in entris.&#60;/p&#62;
&#60;p&#62;An if I use  this hook, no checkbox retrieved in $entry&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_after_submission&#38;quot;, &#38;quot;set_post_content&#38;quot;, 10, 2);

function set_post_content($entry, $form){

	$data = print_r($entry,true);
	$data .= print_r($form,true);
        mail(&#38;quot;david@examples.com&#38;quot;,&#38;quot;Values&#38;quot;,$data,&#38;quot;From:info@examples.com&#38;quot;);

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Where is the problem?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
