Filter selectbox options depending on primary choice
<p>I am creating some selectboxes where i need to restrict my options depending on the choice made in the primary.</p>

<p>Basically i have <code>Select field 1</code> and <code>Select field 2</code>.</p>

<p>Data for these selectboxes are parsed from a database.</p>

<p>Select field 1: </p>

<pre><code>errortype_id | errortype_text
</code></pre>

<p>Select field 2: </p>

<pre><code>errorreason_id | errortype_id | errorreason_text
</code></pre>

<p>Is there a straightforward way i can customsize the option data in <code>Select field 2</code> depending on the choice made in <code>Select field 1</code>? I have the variable/attribute in my <code>Select field 2</code> table to filter.</p>

<p><img src="http://i.stack.imgur.com/ryyZX.png" alt="enter image description here"></p>
