<?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: Dynamically populate checkboxes</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes</link>
		<description>Gravity Support Forums Topic: Dynamically populate checkboxes</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:19:41 +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/dynamically-populate-checkboxes" rel="self" type="application/rss+xml" />

		<item>
			<title>kubante on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37699</link>
			<pubDate>Wed, 12 Oct 2011 10:01:29 +0000</pubDate>
			<dc:creator>kubante</dc:creator>
			<guid isPermaLink="false">37699@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Solved!!!!&#60;/p&#62;
&#60;p&#62;Thanks to &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://return-true.com/2008/12/using-wp_query-to-make-custom-queries-within-wordpress-templates/&#34; rel=&#34;nofollow&#34;&#62;http://return-true.com/2008/12/using-wp_query-to-make-custom-queries-within-wordpress-templates/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The solution is to have following little switches: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query-&#38;gt;query($args);
$temp_posts = $posts;
$posts = null;
$posts = $wp_query-&#38;gt;posts;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;you can then use any tags to filter or do whatever you want!! (check my previous posts, or answer this post if you want the complete code, i will paste it!)  &#60;/p&#62;
&#60;p&#62;thanks god. Love you guys. &#60;/p&#62;
&#60;p&#62;cu,&#60;/p&#62;
&#60;p&#62;kubante
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kubante on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37685</link>
			<pubDate>Wed, 12 Oct 2011 06:52:52 +0000</pubDate>
			<dc:creator>kubante</dc:creator>
			<guid isPermaLink="false">37685@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I even tried using new WP_Query.  Solved one problem, another one came up! Again, driving me crazy. :)&#60;/p&#62;
&#60;p&#62;Now i can filter correctly the languages i want, but unfortunately, only one post is paginated!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Class_Reference/WP_Query&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Class_Reference/WP_Query&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;is explaining that &#60;/p&#62;
&#60;p&#62;Pagination Parameters&#60;/p&#62;
&#60;p&#62;    showposts (int) - number of post to show per page. Deprecated as of Version 2.1 in favor of 'posts_per_page'.&#60;br /&#62;
    posts_per_page (int) - number of post to show per page (available with Version 2.1). Use 'posts_per_page'=&#38;gt;-1 to show all posts. Note if the query is in a feed, wordpress overwrites this parameter with the stored 'posts_per_rss' option. To reimpose the limit, try using the 'post_limits' filter, or filter 'pre_option_posts_per_rss' and return -1 &#60;/p&#62;
&#60;p&#62;Unfortunately this doesn't work. I am not able to override neither with post_limits nor with pre_option_blabla returned to -1.  &#60;/p&#62;
&#60;p&#62;I also noticed that the form field is now not anymore editable via the wysiwig Gravity forms section in wp-admin. Which is not a big issue for me, I wouldnt need to edit anything anymore for this field from the wysiwig, if it worked. :) &#60;/p&#62;
&#60;p&#62;Any idea?&#60;/p&#62;
&#60;p&#62;my retrieval code looks like this at the moment: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$args = array(
	&#38;#39;tax_query&#38;#39; =&#38;gt; array(
		array(
			&#38;#39;taxonomy&#38;#39; =&#38;gt; &#38;#39;languages&#38;#39;,
			&#38;#39;post_limits&#38;#39; =&#38;gt; -1,
			&#38;#39;field&#38;#39; =&#38;gt; &#38;#39;slug&#38;#39;,
			&#38;#39;terms&#38;#39; =&#38;gt; &#38;#39;deutsch&#38;#39;
		)
	)
);

$posts = new WP_Query( $args );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;As said, correct filtering, but only one post title retrieved.&#60;/p&#62;
&#60;p&#62;any help super appreciated. &#60;/p&#62;
&#60;p&#62;regards,&#60;/p&#62;
&#60;p&#62;kubante
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kubante on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37682</link>
			<pubDate>Wed, 12 Oct 2011 05:30:14 +0000</pubDate>
			<dc:creator>kubante</dc:creator>
			<guid isPermaLink="false">37682@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris, &#60;/p&#62;
&#60;p&#62;thanks for your answer. Yes it works. I am able to filter one post title only with  the slug filtering. &#60;/p&#62;
&#60;p&#62;How can I now filter everything from one taxonomy only? or as in my case, even from one taxonomy entry (e.g. &#34;german&#34;) ?  I have a taxonomy called languages, filled with languages (German, English, etc).  I would like to filter e.g. only &#34;german titles&#34;. &#60;/p&#62;
&#60;p&#62;I had another few tries with the example underneath (Custom Post Type Category (Taxonomy) ), but no luck... All post titles come up unfiltered. This is driving me crazy ! :)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$args=array(

	&#38;#39;numberposts&#38;#39; =&#38;gt; 8,
	&#38;#39;orderby&#38;#39; =&#38;gt; &#38;#39;rand&#38;#39;,
  	&#38;#39;post_type&#38;#39; =&#38;gt; &#38;#39;myCustomPostType&#38;#39;,
  	&#38;#39;myCustomPostType_category&#38;#39; =&#38;gt; &#38;#39;Languages&#38;#39; ,
  	&#38;#39;post_status&#38;#39; =&#38;gt; &#38;#39;publish&#38;#39;

);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;any other ideas?  Help totally appreciated!! :)&#60;/p&#62;
&#60;p&#62;Thanks !&#60;/p&#62;
&#60;p&#62;kubante
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37666</link>
			<pubDate>Tue, 11 Oct 2011 22:10:09 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">37666@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@kubante, does this information help at all, using the $args array as you have it up there?&#60;/p&#62;
&#60;p&#62;Custom Post Type Category (Taxonomy)&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Template_Tags/get_posts#Custom_Post_Type_Category_.28Taxonomy.29&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Tags/get_posts#Custom_Post_Type_Category_.28Taxonomy.29&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kubante on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37643</link>
			<pubDate>Tue, 11 Oct 2011 18:51:53 +0000</pubDate>
			<dc:creator>kubante</dc:creator>
			<guid isPermaLink="false">37643@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi David,&#60;br /&#62;
thanks for your Documentation Link. Blame on my I didn't have a look there first. &#60;/p&#62;
&#60;p&#62;After some tries, i could successfully dynamically populate my drop-down. I am struggling with the query of the posts though. After a few hours of tries I decided to come back to you, maybe you have an idea.&#60;/p&#62;
&#60;p&#62;I am using &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_pre_render&#34; rel=&#34;nofollow&#34;&#62;This&#60;/a&#62; as reference, for populating my dropdown. &#60;/p&#62;
&#60;p&#62;So far so good, my titles from custom_posts show up. I am using post_type=myCustomPostType for this. I would now like to filter the titles, to only those of a certain taxonomy. For this I use the function get_posts like this: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$posts = get_posts(&#38;#39;taxonomy=myTaxonomy&#38;amp;tag_ID=22&#38;amp;post_type=myCustomPostType&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Unfortunately, this always queries all of the custom posts, and not only those in the taxonomy i would like. The filter doesn't apply. &#60;/p&#62;
&#60;p&#62;I also tried the variant with the building of the args array: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$args = array(

	&#38;#39;post_type&#38;#39; =&#38;gt; &#38;#39;myCustomPostType&#38;#39;,
	&#38;#39;tag_ID&#38;#39; =&#38;gt; &#38;#39;22&#38;#39;,
	&#38;#39;post_status&#38;#39; =&#38;gt; &#38;#39;publish&#38;#39;
);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;i even tried the    'suppress_filters' =&#38;gt; false, argument, coz i had read about it in connection to the get_posts() function. In addition, i tried swapping get_posts() with query_posts().  Still no Luck .&#60;br /&#62;
  any ideas why my filters are not being applied?&#60;/p&#62;
&#60;p&#62;Thanks ahead and kind regards,&#60;/p&#62;
&#60;p&#62;kubante
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37470</link>
			<pubDate>Mon, 10 Oct 2011 13:14:44 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">37470@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Kubante,&#60;/p&#62;
&#60;p&#62;The method you're using would select that option by default if the value exists; however, to add &#34;new&#34; values or overwrite the existing values in a drop down, take a look at this approach:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kubante on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-37327</link>
			<pubDate>Fri, 07 Oct 2011 17:34:50 +0000</pubDate>
			<dc:creator>kubante</dc:creator>
			<guid isPermaLink="false">37327@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have the same issue as mobitinker.&#60;br /&#62;
I am trying to populate dropdowns with - for testing purposes - just the string &#34;boom&#34;.&#60;/p&#62;
&#60;p&#62;i assigned the parameter language_populate to my drop down field (under &#34;populate this dynamically&#34;), and defined following function in my functions.php: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_action(&#38;#39;gform_field_value_language_populate&#38;#39;, &#38;#39;get_language_populate&#38;#39;);
function get_language_populate($value){
    return &#38;#39;boom!&#38;#39;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;though, I am experiencing the same problem as mobitinker:&#60;br /&#62;
single lines of text get populated normally, but my drop-down field keeps the default values (first choice, second choice, etc) and is not getting populated.&#60;/p&#62;
&#60;p&#62;any ideas why this is happening?&#60;/p&#62;
&#60;p&#62;thanks ahead, regards,&#60;/p&#62;
&#60;p&#62;kubante
&#60;/p&#62;</description>
		</item>
		<item>
			<title>charger15 on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-33684</link>
			<pubDate>Sat, 27 Aug 2011 11:51:44 +0000</pubDate>
			<dc:creator>charger15</dc:creator>
			<guid isPermaLink="false">33684@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@webpuzzlemaster:&#60;/p&#62;
&#60;p&#62;I was in a very similar situation and solved the problem like this. This code is placed inside index.php&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Give every link an ID (in my case it was post ID as I show all posts on one site) and add it at the end of the url as query string
$addLink = get_page_link(16).&#38;quot;?ref=&#38;quot;.$post-&#38;gt;ID;
echo &#38;quot;&#38;lt;div class=&#38;#39;add&#38;#39;&#38;gt;&#38;lt;a href=&#38;#39;$addLink&#38;#39;&#38;gt;A link to the form&#38;lt;/a&#38;gt;&#38;lt;/div&#38;gt;&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I then could get the parameter value on the site where the form was placed and use it to prepopulate certain fields with values from the post I was referring to in the link. For example (code inside functions.php):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// populate category
add_filter(&#38;quot;gform_field_value_record_link_category&#38;quot;, &#38;quot;usr_populate_record_link_category&#38;quot;);
function usr_populate_record_link_category(){
  $ref_id = $_GET[&#38;#39;ref&#38;#39;];

  if(isset($ref_id)){
    $post = get_the_category($ref_id);
    $category = $post[0]-&#38;gt;cat_ID;
    return $category;
  }
}

// populate title
add_filter(&#38;quot;gform_field_value_record_link_title&#38;quot;, &#38;quot;usr_populate_record_link_title&#38;quot;);
function usr_populate_record_link_title(){
  $ref_id = $_GET[&#38;#39;ref&#38;#39;];

  if(isset($ref_id)){
    $post = get_post($ref_id);
    $title = $post-&#38;gt;post_title;
    return $title;
  }
}

// set parent post
add_filter(&#38;quot;gform_post_data&#38;quot;, &#38;quot;usr_set_post_parent&#38;quot;, 10, 2);
function usr_set_post_parent($post_data, $form){
  $ref_id = $_GET[&#38;#39;ref&#38;#39;];

  if($form[&#38;quot;id&#38;quot;] == 1){
    $post_data[&#38;quot;post_parent&#38;quot;] = &#38;quot;$ref_id&#38;quot;;
  }
  return $post_data;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>webpuzzlemaster on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-31198</link>
			<pubDate>Fri, 29 Jul 2011 11:12:19 +0000</pubDate>
			<dc:creator>webpuzzlemaster</dc:creator>
			<guid isPermaLink="false">31198@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;a question related to this topic, i have a page with 4 links.&#60;/p&#62;
&#60;p&#62;lets say when the first link is click, it will be redirected to page where the form is, and 1 out of 4 checkbox should be selected..&#60;/p&#62;
&#60;p&#62;now, if i click the 2nd link, it will be redirected to page where the form is, and 2 out of 4 checkbox should be selected.. and so on and so forth..&#60;/p&#62;
&#60;p&#62;how can i do that?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Dynamically populate checkboxes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-checkboxes#post-19840</link>
			<pubDate>Thu, 03 Mar 2011 15:41:56 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">19840@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Mobi,&#60;/p&#62;
&#60;p&#62;Can you share a screenshot of how you have your checkbox field setup?&#60;/p&#62;
&#60;p&#62;In regards to your other questions:&#60;/p&#62;
&#60;p&#62;1 - add_filter() is correct; add_action() will still interpret this as a filter and work appropriately, but it was just a typo in my code.&#60;br /&#62;
2 - We are very close to releasing the new documentation which has extensive coverage of all the available Gravity Form hooks (even the GF Add-ons!). Sorry for the wait, but just a little longer now. :)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
