<?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: conditional logic dynamically populated field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field</link>
		<description>Gravity Support Forums Topic: conditional logic dynamically populated field</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 10:08:36 +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/conditional-logic-dynamically-populated-field" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62968</link>
			<pubDate>Tue, 19 Jun 2012 08:55:48 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">62968@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry, I'm not a JavaScript expert, and getting a hold of one of the developers that is takes time. I'm glad you were able to sort it out though.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>espo_74 on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62966</link>
			<pubDate>Tue, 19 Jun 2012 08:54:48 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62966@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;For anyone else looking for a similar answer:&#60;br /&#62;
You can manually fire the change event after you dynamically populate the field, eg:&#60;/p&#62;
&#60;p&#62; &#60;code&#62;jQuery(&#38;quot;#input_4_62&#38;quot;).val(machineGroup).change();&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>espo_74 on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62914</link>
			<pubDate>Mon, 18 Jun 2012 16:33:10 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62914@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any thoughts on how to make the form register when data has been dynamically entered into a field?&#60;/p&#62;
&#60;p&#62;(bump)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>espo_74 on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62904</link>
			<pubDate>Mon, 18 Jun 2012 14:53:30 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62904@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am not sure how I would do that--well, I can see how to do that, but writing individual conditions would make a very long set of conditional logic and not be quite as dynamic as I am hoping for--the drop down is generated from a Taxonomy. I was hoping to utilize this &#34;filter&#34; I have written &#60;/p&#62;
&#60;p&#62;This is what I am working with:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render_4&#38;quot;, &#38;quot;monitor_dropdown&#38;quot;);
function monitor_dropdown($form){

?&#38;gt;
    &#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;

    jQuery(document).ready(function(){

      jQuery(&#38;#39;#input_4_40&#38;#39;).bind(&#38;#39;change&#38;#39;, function()
        {

           //get selected value from drop down;
            var selectedValue = jQuery(&#38;quot;#input_4_40&#38;quot;).val();

            //populate a text field with the selected drop down value
            jQuery(&#38;quot;#input_4_64&#38;quot;).val(selectedValue);

       });

    });

$(function(){
var groupFromValue = {

227: {
        name: &#38;#39;B-1300SS&#38;#39;,
        group: &#38;#39;8&#38;#39;
    },

228: {
        name: &#38;#39;B-1500SS&#38;#39;,
        group: &#38;#39;3&#38;#39;
    },

  235: {
        name: &#38;#39;SG4600-72&#38;#39;,
        group: &#38;#39;9&#38;#39;
}

}

$(&#38;#39;select&#38;#39;).change(function() {
    var machineName = groupFromValue[$(this).val()].name;
    var machineGroup = groupFromValue[$(this).val()].group;
	jQuery(&#38;quot;#input_4_63&#38;quot;).val(machineName);
	jQuery(&#38;quot;#input_4_62&#38;quot;).val(machineGroup);

});
});
    &#38;lt;/script&#38;gt;
&#38;lt;?php

return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I filter the value and name to come up with group. based on teh data input into the field (in this case (machineGroup) i am trying to use that value to trigger a few input fields on the form. I am doing it this way because i have over 50 machines which are sorted into 3 machineGroup
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62900</link>
			<pubDate>Mon, 18 Jun 2012 14:35:49 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">62900@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you not hook the conditional logic to the selection of the drop down?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>espo_74 on "conditional logic dynamically populated field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-logic-dynamically-populated-field#post-62899</link>
			<pubDate>Mon, 18 Jun 2012 14:32:01 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62899@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I am dynamically populating a text field with a value from a drop down. I was hoping that the value would initiate some conditional logic to show/hide form fields, however it doesn't seem as though the conditional logic registers when that field has a value written to it. &#60;/p&#62;
&#60;p&#62;To write the value I am using:&#60;br /&#62;
&#60;code&#62;jQuery(&#38;quot;#input_4_64&#38;quot;).val(selectedValue);&#60;/code&#62;&#60;br /&#62;
This inserts the value into that field and it writes correctly but it doesn't fire the logic unless I manually input the &#34;condition&#34;.&#60;/p&#62;
&#60;p&#62;Is there a way around this? or to make the conditional logic to &#34;see&#34; when that value changes/gets written?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
