<?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: Trying dynamic checkboxes population</title>
		<link>https://legacy.forums.gravityhelp.com/topic/trying-dynamic-checkboxes-population</link>
		<description>Gravity Support Forums Topic: Trying dynamic checkboxes population</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:32:56 +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/trying-dynamic-checkboxes-population" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Trying dynamic checkboxes population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-dynamic-checkboxes-population#post-76350</link>
			<pubDate>Wed, 19 Sep 2012 15:37:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">76350@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When you say kept, do you mean the checkbox status is not kept?  Or the checkbox itself is not there?  I think we are talking about two different things.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sms@gapla.cat on "Trying dynamic checkboxes population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-dynamic-checkboxes-population#post-76262</link>
			<pubDate>Wed, 19 Sep 2012 05:09:02 +0000</pubDate>
			<dc:creator>sms@gapla.cat</dc:creator>
			<guid isPermaLink="false">76262@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for your answer. Yes, I had already seen this. In fact I think my code is very similar, but I think there is something wrong because some checkboxes are kept and some others doesnt.&#60;/p&#62;
&#60;p&#62;Please try this page: &#60;a href=&#34;http://absoluteme.co.uk/survey/&#34; rel=&#34;nofollow&#34;&#62;http://absoluteme.co.uk/survey/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;and then try to mark checkboxes on the right column from &#34;Sculptra&#34; to &#34;Thermage&#34; (you should be registered to make this, but it's free). Then press &#34;Next&#34; and then press &#34;Previous&#34; to return to the same page and see which checkbox values are retained and which aren't retained (since &#34;Slim Lipo&#34; are not retained). Maybe there is a maximum checkboxes limit on a group since then values are not retained ?&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Trying dynamic checkboxes population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-dynamic-checkboxes-population#post-76170</link>
			<pubDate>Tue, 18 Sep 2012 20:21:10 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">76170@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Please see this reply by lead developer Alex Cancado:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/dynamic-checkboxes#post-9476&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/dynamic-checkboxes#post-9476&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sms@gapla.cat on "Trying dynamic checkboxes population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-dynamic-checkboxes-population#post-75880</link>
			<pubDate>Mon, 17 Sep 2012 15:16:27 +0000</pubDate>
			<dc:creator>sms@gapla.cat</dc:creator>
			<guid isPermaLink="false">75880@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi. I have this code for population a group of checkboxes:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render_7&#38;quot;, &#38;quot;pre_survey&#38;quot;);
function pre_survey($form){
   global $wpdb;

   $strSQL = &#38;#39;SELECT name FROM wp_pod_tbl_treatment1 ORDER BY name&#38;#39;;
   $tmts = $wpdb-&#38;gt;get_results($strSQL);
   $i = 0;
   foreach($tmts as $tmt) {
         $i1 = $i+1;
         $id = &#38;#39;10.&#38;#39; . $i1;
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;choices&#38;#39;][$i][&#38;#39;text&#38;#39;] = $tmt-&#38;gt;name;
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;choices&#38;#39;][$i][&#38;#39;value&#38;#39;] = $id;
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;choices&#38;#39;][$i][&#38;#39;isSelected&#38;#39;] = ($_POST[&#38;#39;input_10_&#38;#39; . $i1]);
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;inputs&#38;#39;][$i][&#38;#39;id&#38;#39;] = $id;
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;inputs&#38;#39;][$i][&#38;#39;label&#38;#39;] = $tmt-&#38;gt;name;
         $form[&#38;#39;fields&#38;#39;][5][&#38;#39;inputs&#38;#39;][$i][&#38;#39;name&#38;#39;] = $id;
         $i++;
   }
   return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The problem is some checkboxes seems not to be stored or even kept when I go to next page and then go back to this page. Am I doing something wrong ?&#60;/p&#62;
&#60;p&#62;Also, I would like on next page to show a question for every marked checkbox. Is this the correct hook where I can do this ? Is there any example in how to achieving this ?&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
