Hi,
Could I get some guidance on the code below?
When a customer selects a number from the dropdown list, enters their email and clicks submit, the chosen number and email goes into the database. However when this number is chosen I want this number removed from the dropdown list so a future customer cannot select the same number again. Any help much appreciated.
Thanks,
Calvin
import wixData from ‘wix-data’;
function onClick (selectnumber) {
function removeOptions(selectnumber_click)
{
var dropdowndelete = removeOptions(‘onedropdown’)
for (selectnumber-1;dropdowndelete>=0;dropdowndelete–)
{
if (selectnumber.options[dropdowndelete].selected)
selectnumber.remove(dropdowndelete);
}
}
}