<div class="deals_options">
Choose:
<?php
echo '<select name="chosen_options[]">';
foreach($deals_options as $option)
{
echo '
<option value="'.$option['value'].'">'.$option['displaytext'].'</option>
';
}
echo '</select>';
?>
</div>
This is what I currently have. This outputs a select presenting the options that exists for this deal offer, you can select between.
Now for the deal offer, you can also select how many of the deal offers you want. And I would like to do so it shows as many selectors as you have chosen deal offers.
E.g if you picked 3 in the How many deal offer, then it should show 3 of the selectors where you can choose.
Here’s a example:
This is not working, so when you select a amount nothing happens, but as you can see the HTML/output is how i wish it to work. When you choose 3, it shows 3 of those selectors.
Edit: See below code in case if you want to add/remove from the DOM, DEMO
Or Alternatively you can show/hide based on deals_amount selection,
DEMO