<?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: checking or unchecking checkbox on form render</title>
		<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render</link>
		<description>Gravity Support Forums Topic: checking or unchecking checkbox on form render</description>
		<language>en-US</language>
		<pubDate>Thu, 23 Apr 2026 07:10:11 +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/checking-or-unchecking-checkbox-on-form-render" rel="self" type="application/rss+xml" />

		<item>
			<title>adomedia on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29761</link>
			<pubDate>Tue, 12 Jul 2011 05:12:41 +0000</pubDate>
			<dc:creator>adomedia</dc:creator>
			<guid isPermaLink="false">29761@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;works a treat, excellent!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29751</link>
			<pubDate>Mon, 11 Jul 2011 22:31:30 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">29751@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am not sure I follow. If you mean access each checkbox choice inside a field, you don't need to do it. Just return the choice text as one of the items in the comma separated list and that specific checkbox will be checked.&#60;/p&#62;
&#60;p&#62;If you are asking how to access each checkbox field, you do that by the parameter name. When you turn on the option in the form settings to &#34;Allow field to be populated dynamically&#34;, you give it a parameter name. That name is used in the hook.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_$parameter_name&#38;quot;, &#38;quot;populate_checkbox&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In your example above, the parameter name was &#34;checkbox&#34;, so we used &#34;gform_field_value_checkbox&#34; for the filter name:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_checkbox&#38;quot;, &#38;quot;populate_checkbox&#38;quot;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>adomedia on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29739</link>
			<pubDate>Mon, 11 Jul 2011 18:24:45 +0000</pubDate>
			<dc:creator>adomedia</dc:creator>
			<guid isPermaLink="false">29739@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, that's makes sense. How do I reference each of the checkboxes? By id? Or by the order in which they are generated?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29697</link>
			<pubDate>Mon, 11 Jul 2011 16:46:23 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">29697@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Your filter function needs to return a comma separated list of all choices that you want to be checked. If you want a choice to remain unchecked, simply don't include it in the list.&#60;br /&#62;
In my example below, the items &#34;First&#34; and &#34;Second&#34; will be checked, while all other choices I have in that field will remain unchecked.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function populate_checkbox(){
   return &#38;quot;First,Second&#38;quot;;
}
add_filter(&#38;quot;gform_field_value_checkbox&#38;quot;, &#38;quot;populate_checkbox&#38;quot;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>adomedia on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29632</link>
			<pubDate>Mon, 11 Jul 2011 12:26:56 +0000</pubDate>
			<dc:creator>adomedia</dc:creator>
			<guid isPermaLink="false">29632@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;??? any ideas ???
&#60;/p&#62;</description>
		</item>
		<item>
			<title>adomedia on "checking or unchecking checkbox on form render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checking-or-unchecking-checkbox-on-form-render#post-29601</link>
			<pubDate>Mon, 11 Jul 2011 08:47:11 +0000</pubDate>
			<dc:creator>adomedia</dc:creator>
			<guid isPermaLink="false">29601@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ho would I pre populate a checkbox with &#34;checked&#34; or &#34;unchecked&#34; depending on a variable I pass to the function?&#60;/p&#62;
&#60;p&#62;so far I have:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function populate_checkbox() {
if(meets criteria) {
check the box (what goes here???)
} else {
don&#38;#39;t check the box
}
add_filter(&#38;quot;gform_field_value_checkbox&#38;quot;, &#38;quot;populate_checkbox&#38;quot;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
