現在のフィールドのすぐ次の選択ボックスの値のみを変更しようとしています。
フォームは、同じクラスを持つフィールドを持つ行の長いリストです。「行1」の「数量」フィールドにフォーカスして、「タイプ」選択ボックスを同じ行の「ボックス」に変更したいと思います。私が試したすべてのコードは、ページ全体のすべての「タイプ」選択ボックスを変更します。数量フィールドに最も近い、最も近いものだけを変更したい。
UOMフィールドは、ユーザーが数量に注目したときに変更しようとしているフィールドです。
ありがとう!
<tr class="draggable odd">
<td class="content-multigroup-cell-field-part-num">
<div id="edit-group-order-0-field-part-num-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-part-num-value">J&B No.:
</label>
<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]*">
</div>
</td>
<td class="content-multigroup-cell-field-quantity">
<div id="edit-group-order-0-field-quantity-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-quantity-value">Quantity:
</label>
<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]*">
</div>
</td>
<td class="content-multigroup-cell-field-quantity-type">
<div id="edit-group-order-0-field-quantity-type-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-quantity-type-value">UOM:
</label>
<select id="edit-group-order-0-field-quantity-type-value" class="form-select" name="group_order[0][field_quantity_type][value]">
<option selected="selected" value="">- None -
</option>
<option value="Box(es)">Box(es)
</option>
<option value="Case(s)">Case(s)
</option>
<option value="Each">Each
</option>
<option value="Feet">Feet
</option>
</select>
</div>
</td>
J&B番号:数量:単位:-なし-ボックスケース各フィート