<?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: Bug found in dynamically creating check boxes</title>
		<link>https://legacy.forums.gravityhelp.com/topic/bug-found-in-dynamically-creating-check-boxes</link>
		<description>Gravity Support Forums Topic: Bug found in dynamically creating check boxes</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:18:24 +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/bug-found-in-dynamically-creating-check-boxes" rel="self" type="application/rss+xml" />

		<item>
			<title>bazchas on "Bug found in dynamically creating check boxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/bug-found-in-dynamically-creating-check-boxes#post-46216</link>
			<pubDate>Thu, 12 Jan 2012 08:54:06 +0000</pubDate>
			<dc:creator>bazchas</dc:creator>
			<guid isPermaLink="false">46216@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have dynamically created a set of checkboxes using the 'choices' item of the field.  In the UI I only have a single checkbox that I applied a number of new items to it however I am unable to fetch any data from the field other than the first checkbox e.g '10.1' and not '10.2....'&#60;/p&#62;
&#60;p&#62;This is the function I use to populate the checkboxes.&#60;/p&#62;
&#60;p&#62;public function GFAddCheckBoxes(&#38;amp;$field,$cssclass,$choices)&#60;br /&#62;
    {&#60;br /&#62;
        //look for the select&#60;br /&#62;
        if ($field['type'] == 'checkbox' &#38;amp;&#38;amp; strpos($field['cssClass'],$cssclass) !==false)&#60;br /&#62;
        {&#60;br /&#62;
            $inputs = array();&#60;br /&#62;
            for($i = 1; $i&#38;lt;=count($choices); $i++)&#60;br /&#62;
            {&#60;br /&#62;
                $choice = $choices[$i-1];&#60;br /&#62;
                $field_id = $field['id'].&#34;.&#34;.$i;&#60;br /&#62;
                $label = $choice['text'];&#60;br /&#62;
                array_push($inputs,array(&#34;label&#34;=&#38;gt;$label,&#34;id&#34;=&#38;gt;$field_id));&#60;br /&#62;
            }&#60;br /&#62;
            $field['choices'] = $choices;&#60;br /&#62;
            $field['inputs'] = $inputs;&#60;br /&#62;
        }&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;The functions works as I expect as I see multiple checkboxes in my form but I am unable to fetch all the result values from them.  I can see this more clearly when I do a var_dump of the form and can only see the first checkbox.&#60;/p&#62;
&#60;p&#62;Regards
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
