<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - How to update fields after collection_select :onchange]]></title>
		<link>http://railsforum.com/viewtopic.php?id=51591</link>
		<description><![CDATA[The most recent posts in How to update fields after collection_select :onchange.]]></description>
		<lastBuildDate>Wed, 12 Dec 2012 19:07:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[How to update fields after collection_select :onchange]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=157529#p157529</link>
			<description><![CDATA[<p>I have a page with multiple identical collection_select boxes. When an item is selected in a particular box, I would like to update the fields relevant to that dropdown box, but not the equivalent fields for the other collection_select boxes. As an example, if Amplifiers have a &quot;wattage&quot; property, I would like to update the wattage field for each amplifier after it&#039;s chosen from a dropdown without accidentally updating the wattage fields for other amplifiers. </p><p>The most basic way I can think of would be to uniquely label each amplifier wattage field upon creation, then store this and update only this field in the :onchange code. Is there an easier way to do this? </p><p>I currently have a partial that creates the form for each amplifier (dropdown plus associated fields).</p>]]></description>
			<author><![CDATA[dummy@example.com (asfarley)]]></author>
			<pubDate>Wed, 12 Dec 2012 19:07:00 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=157529#p157529</guid>
		</item>
	</channel>
</rss>
