I have a field which produces a drop down that a user can select from as such
$(function() {
$('.serial_number').live('focus.autocomplete', function() {
$(this).autocomplete("/admin/includes/getinvoiceajax.php", {
width: 300,
matchContains: true,
mustMatch: true,
selectFirst: false
});
});
});
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
I have set the mustMatch: true, so a user can only select what is from the dropdown list. Is there a way to not allow a duplicate selection from any of the other fields. Since I have a few of these fields it could possible allow the user to select the same value for multiple fields. I need to make sure they are unique.
My origianl question was not allowing a value that did not exist from the dropdown which was I figured it our as soon as I asked the question. I had to change
to
I editied my original question to ask another relating to the same subject.