jquerymobile-editablelistview
jquerymobile-editablelistview copied to clipboard
using a select element in form (complex list)
Is there any inherent reason why one of the form inputs in a complex list cannot be a select list (i.e., a dropdown menu)? Regular text inputs seem to work fine, but I haven't been able to get a select list to work yet. There is no error; when I click the Add button, nothing happens.
<ul data-role="listview" data-editable="true" data-editable-type="complex" data-editable-form="editing-form" data-title="Partners" data-empty-title="No Partners">
Here is the html for the form:
<form id="editing-form" data-editable-form="true">
<input type="text" data-item-name="partnerNames" data-item-template="<h3 id='partnerNames'>Names: %%</h3>"></div>
<select data-item-name="partnerType" data-item-template="<p id='partnerType'>Type: %%<p>" name="partner-type"><option value="1">Alumni</option>
<option value="2">Businesses</option>
<option value="3">Community Groups</option>
<option value="4">Educators/Schools</option><option value="6">Government</option>
<option value="5">Health Care</option><option value="7">Media</option>
</select>
<button class="ui-btn ui-corner-all" data-add-button="true">Add</button>
<button class="ui-btn ui-corner-all" data-clear-button="true">Clear</button>
</form>
And the list item html (done as a foreach loop):
<li class="names">
<h3 id="partnerNames">Names:$partner-names</h3>
<p id="partnerType">Type: $partner-type</p>
</li>
I've created a workaround for this with a hidden text field.