<?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: onChange JavaScript</title>
		<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript</link>
		<description>Gravity Support Forums Topic: onChange JavaScript</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:03:28 +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/onchange-javascript" rel="self" type="application/rss+xml" />

		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53894</link>
			<pubDate>Fri, 30 Mar 2012 17:47:00 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53894@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53382</link>
			<pubDate>Sun, 25 Mar 2012 12:52:46 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">53382@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Place this class name on the field in question: change_class&#60;/p&#62;
&#60;p&#62;Then use this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_action(&#38;quot;gform_field_input&#38;quot;, &#38;quot;map_input&#38;quot;, 10, 5);
function map_input($input, $field, $value, $lead_id, $form_id){
    if($field[&#38;quot;cssClass&#38;quot;] == &#38;quot;change_class&#38;quot;){
        $input = &#38;#39;&#38;lt;input id=&#38;quot;txtColor&#38;quot; class=&#38;quot;color&#38;quot; onchange=&#38;quot;document.getElementById(&#38;quot;dColor&#38;quot;).style.backgroundColor = &#38;quot;#&#38;quot; + this.color&#38;quot; &#38;gt;&#38;#39;;
    }
    return $input;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53342</link>
			<pubDate>Sat, 24 Mar 2012 14:27:07 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53342@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Kevin, thank you for the quick response. I would really appreciate you If you can give me the actual code for this. I read the link you pass me, but I'm not good programming. &#60;/p&#62;
&#60;p&#62;I know you shouldn't do this for me, but could you exception this time?&#60;/p&#62;
&#60;p&#62;The name of the input is: input_3_9 and what i need to insert this input is &#60;code&#62;onchange=&#38;quot;document.getElementById(&#38;quot;dColor&#38;quot;).style.backgroundColor = &#38;#39;#&#38;#39; + this.color&#38;quot;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Thanks mate.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kevin Flahaut on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53315</link>
			<pubDate>Fri, 23 Mar 2012 20:59:24 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">53315@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You would need to use this filter to modify the input.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_input&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_input&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53312</link>
			<pubDate>Fri, 23 Mar 2012 20:49:26 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53312@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;How can I achieve this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53311</link>
			<pubDate>Fri, 23 Mar 2012 20:41:10 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53311@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Kevin, thanks for the response. The ONCHANGE event its supposed to happend inside a input text, here is the example:&#60;/p&#62;
&#60;p&#62;&#38;lt;input id=&#34;txtColor&#34; class=&#34;color&#34; onchange=&#34;document.getElementById(&#34;dColor&#34;).style.backgroundColor =  '#' + this.color&#34; &#38;gt;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kevin Flahaut on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53308</link>
			<pubDate>Fri, 23 Mar 2012 20:03:20 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">53308@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You would need to view the source, get the input ID and then plug that into your script so it would know what it's supposed to change. You would place your script in your theme's header.php file wherever your particular theme recommends you to place custom script blocks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53298</link>
			<pubDate>Fri, 23 Mar 2012 16:42:37 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53298@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kiwii on "onChange JavaScript"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/onchange-javascript#post-53127</link>
			<pubDate>Wed, 21 Mar 2012 23:01:34 +0000</pubDate>
			<dc:creator>kiwii</dc:creator>
			<guid isPermaLink="false">53127@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I need to put this code inside a normal input.&#60;/p&#62;
&#60;p&#62;onchange=&#34;document.getElementById(&#34;dColor&#34;).style.backgroundColor = '#' + this.color&#34; &#60;/p&#62;
&#60;p&#62;How do I do this?&#60;br /&#62;
Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
