I have the dropdown in the frontend form for RMA. I want to add the dependent dropdown for more specifically describe the reason.
Parent Dropdown:
<select type="select" name="reason_id" id="reason_id" title="Choose Reason" class="validate-select required-entry">
<option value="">Please select reason</option>
<option value="1">Defective</option>
<option value="2">Wrong Item</option>
<option value="3">Damaged in Transit</option>
<option value="5">Return</option>
<option value="4">Other</option>
</select>
Now I want to add the second dropdown on change parent dropdown option.
for example: I am choosing "Defective" option from the parent dropdown then the below option will be dispalyed:
<select type="select" name="reason_id" id="reason_id" title="Choose Reason" class="validate-select required-entry">
<option value="">Please select reason</option>
<option value="1">Did not Fit</option>
<option value="2">Stopped working after a certain time</option>
<option value="3">Other</option>
</select>
for example: When I choosing "Wrong Item" from the parent dropdown then the below option will be dispalyed:
<select type="select" name="reason_id" id="reason_id" title="Choose Reason" class="validate-select required-entry">
<option value="">Please select reason</option>
<option value="1">test1</option>
<option value="2">test2</option>
<option value="3">test3</option>
</select>
All items will be fixed.
How can add using jquery?