I am inserting a small editable select-option in a html form. But i don't want to send it. So i need a select-option version of this
<div contenteditable="true">
This text can be edited by the user.
</div>
Something like that
<div select="true">
<div option="true"></div>
<div option="true"></div>
<div option="true"></div>
</div>
Is there a an easy way to achieve it without using js?
CodePudding user response:
If you just have a normal select with some options but don't have a name attribute the selected option will not be submitted:
<select>
<option>a</option>
<option>b</option>
</select>
So the select can be contained within, and formatted as part of, the form element with no problem,
If you have a name attribute but with an empty name string then it seems browsers will submit the value but with nothing before the =