i have following part of code:
<input id="add" class="add" data-amount="150" data-monthly="25" type="checkbox" name="accessory[]" value="Accessory Name"/>
wondering if there any way to post all data in “value”, “data-amount” and “data-monthly” together to another script?
i have following part of code: <input id=add class=add data-amount=150 data-monthly=25 type=checkbox name=accessory[] value=Accessory
Share
To get all those values in the checkbox, you can concatenate them together separated by some delimiter and then split the value when processing the form.
This is not an elegant solution. It does what you ask, but you should strongly consider Sohnee’s answer as a better method of doing what you want to do.