<?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: Edit form field manually with javascript</title>
		<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript</link>
		<description>Gravity Support Forums Topic: Edit form field manually with javascript</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 10:02:05 +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/edit-form-field-manually-with-javascript" rel="self" type="application/rss+xml" />

		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-362964</link>
			<pubDate>Fri, 05 Jul 2013 06:18:11 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">362964@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yeah, I put a try catch around it, I couldn't figure out why the function threw an undefined jquery event which crashes the application. So it's not really solved, but fixed enough :)&#60;/p&#62;
&#60;p&#62;It threw 3 events in this order:&#60;br /&#62;
gform_post_conditional_logic,&#60;br /&#62;
change&#60;br /&#62;
undefined (crashes jquery)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-361964</link>
			<pubDate>Thu, 04 Jul 2013 16:49:13 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">361964@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It looks like you figured this out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-357793</link>
			<pubDate>Tue, 02 Jul 2013 11:26:03 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">357793@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It appears to work. The field gets shown. I only now have to solve an error I get from calling the function inside trigger&#60;/p&#62;
&#60;p&#62;&#34;Uncaught TypeError: Cannot convert null to object &#34;  in jquery.min.js line 5.&#60;/p&#62;
&#60;p&#62;Thanks for the gf_apply_rules function.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-357420</link>
			<pubDate>Tue, 02 Jul 2013 07:20:02 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">357420@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It's because you are using a hidden field which doesn't get an onChange event added to it, try this instead&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;.trigger(gf_apply_rules(2, [6,16,17,18,19,20], true));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;the numbers inside the square brackets are the fields you have set the conditional logic on, I just copied them all but you can reduce it down to just the field or fields you want the conditional logic triggered on
&#60;/p&#62;</description>
		</item>
		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-357354</link>
			<pubDate>Tue, 02 Jul 2013 06:35:54 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">357354@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It can be viewed at &#60;a href=&#34;http://www.thislooksgreat.com/&#34; rel=&#34;nofollow&#34;&#62;http://www.thislooksgreat.com/&#60;/a&#62;&#60;br /&#62;
After you have uploaded an image the code is run at ~line 368  inline script.&#60;br /&#62;
I've removed the trigger() code tho as it appeared to do nothing.  If you press F5 after uploading an image the field that is supposed to be shown is visible. So the conditional logic works on a refresh.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-355352</link>
			<pubDate>Mon, 01 Jul 2013 06:24:39 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">355352@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you post your full script or a link to see this live.  Forgetting triggering the conditional logic for a moment, does your script successfully set the value on the input?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-355321</link>
			<pubDate>Mon, 01 Jul 2013 06:10:45 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">355321@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Anyone have any idea why the conditional logic event isn't being updated properly when using richardvav's example?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-352663</link>
			<pubDate>Sat, 29 Jun 2013 17:57:55 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">352663@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sadly it does not work for me.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$hiddenImageFieldID.val(f_data.path + f_data.file).change();&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I've also tried using&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;.trigger(&#38;quot;change&#38;quot;)&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-352622</link>
			<pubDate>Sat, 29 Jun 2013 17:16:40 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">352622@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So the Gravity Forms conditional logic works by applying an onChange event to the input but when you use JavaScript to set the value of that input the onChange event isn't triggered but the good news is that you can trigger it by using the jQuery &#60;a href=&#34;http://api.jquery.com/change/&#34; rel=&#34;nofollow&#34;&#62;.change()&#60;/a&#62; method without any arguments like so&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;quot;#input_23_4&#38;quot;).val(&#38;quot;10&#38;quot;).change();&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>xtrme on "Edit form field manually with javascript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/edit-form-field-manually-with-javascript#post-352447</link>
			<pubDate>Sat, 29 Jun 2013 14:47:48 +0000</pubDate>
			<dc:creator>xtrme</dc:creator>
			<guid isPermaLink="false">352447@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello, how do I manually through javascript update a fields value so constraints are properly triggered?&#60;br /&#62;
  I am currently using    jQuery(&#34;#field_x_y&#34;).val(&#34;value&#34;);&#60;/p&#62;
&#60;p&#62;  My constraint is:&#60;br /&#62;
  Show if  Imagefile_path is not undefined &#60;/p&#62;
&#60;p&#62;  Where Imagefile_path is the hidden element (field_x_y) being set by the javascript and its default value is undefined
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
