Note that there are some explanatory texts on larger screens.

plurals
  1. POSelect ONLY the very next select box (jQuery)
    primarykey
    data
    text
    <p>I am trying to change the value of <em>only</em> the very next select box after the current field.</p> <p>The form is a long list of rows with fields that have the same classes. On focus of the "quantity" field in "row 1" I want to change the "type" select box to "boxes" in that same row. All the code I try makes ALL of the "type" select boxes on the entire page change. I only want the most immediate one, closest to the quantity field to change.</p> <p><strong>The UOM field is the field I am attempting to change when the user focuses on Quantity.</strong></p> <p>Thanks!</p> <pre><code>&lt;tr class="draggable odd"&gt; &lt;td class="content-multigroup-cell-field-part-num"&gt; &lt;div id="edit-group-order-0-field-part-num-value-wrapper" class="form-item"&gt; &lt;label for="edit-group-order-0-field-part-num-value"&gt;J&amp;amp;B No.: &lt;/label&gt; &lt;input type="text" class="form-text text idleField" value="" size="10" id="edit-group-order-0-field-part-num-value" name="group_order[0][field_part_num][value]" pattern="[0-9]*"&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="content-multigroup-cell-field-quantity"&gt; &lt;div id="edit-group-order-0-field-quantity-value-wrapper" class="form-item"&gt; &lt;label for="edit-group-order-0-field-quantity-value"&gt;Quantity: &lt;/label&gt; &lt;input type="text" class="form-text text idleField" value="" size="5" id="edit-group-order-0-field-quantity-value" name="group_order[0][field_quantity][value]" pattern="[0-9]*"&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="content-multigroup-cell-field-quantity-type"&gt; &lt;div id="edit-group-order-0-field-quantity-type-value-wrapper" class="form-item"&gt; &lt;label for="edit-group-order-0-field-quantity-type-value"&gt;UOM: &lt;/label&gt; &lt;select id="edit-group-order-0-field-quantity-type-value" class="form-select" name="group_order[0][field_quantity_type][value]"&gt; &lt;option selected="selected" value=""&gt;- None - &lt;/option&gt; &lt;option value="Box(es)"&gt;Box(es) &lt;/option&gt; &lt;option value="Case(s)"&gt;Case(s) &lt;/option&gt; &lt;option value="Each"&gt;Each &lt;/option&gt; &lt;option value="Feet"&gt;Feet &lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;/td&gt; </code></pre> <p> J&amp;B No.: Quantity: UOM: - None - Box(es) Case(s) Each Feet </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload