Jquery - Add a property to an input field when some criteria match
<p>I don't know if this is possible to do with Jquery/Javascript.</p>

<p>The case:</p>

<p>I have a hidden input field and a select field, I need to add 'value="1"' to the hidden input field when I select an option with the value >= 1 on the select field.</p>

<pre><code>&lt;input id="id-1-biketype" type="hidden" name="1-biketype"&gt;
&lt;select id="id-1-units" name="1-units"&gt;
    &lt;option selected="selected" value=""&gt;0&lt;/option&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
    &lt;option value="4"&gt;4&lt;/option&gt;
    &lt;option value="5"&gt;5&lt;/option&gt;
    &lt;option value="6"&gt;6&lt;/option&gt;
    &lt;option value="7"&gt;7&lt;/option&gt;
    &lt;option value="8"&gt;8&lt;/option&gt;
    &lt;option value="9"&gt;9&lt;/option&gt;
    &lt;option value="10"&gt;10&lt;/option&gt;
    &lt;option value="11"&gt;11&lt;/option&gt;
    &lt;option value="12"&gt;12&lt;/option&gt;
    &lt;option value="13"&gt;13&lt;/option&gt;
    &lt;option value="14"&gt;14&lt;/option&gt;
    &lt;option value="15"&gt;15&lt;/option&gt;
    &lt;option value="16"&gt;16&lt;/option&gt;
    &lt;option value="17"&gt;17&lt;/option&gt;
    &lt;option value="18"&gt;18&lt;/option&gt;
    &lt;option value="19"&gt;19&lt;/option&gt;
    &lt;option value="20"&gt;20&lt;/option&gt;
    &lt;option value="999"&gt;+20&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>So that the hidden input looks like this:</p>

<pre><code>&lt;input id="id-1-biketype" type="hidden" name="1-biketype" value="1"&gt;
</code></pre>

<p>Any clues on how to do this and if it is possible?</p>

<p>Best Regards,</p>
