I have two fields that usually work as they should and submit. their IDs and names are 'location_names' and 'sub_cat'
My script is complete except for the fact that I want the 'sub_cat' field value to be ignored (it is completely ignored now) only when the value is '-10' and for it to replace 'location_names' if the value IS NOT '-10'. I had several failed attempts at doing this, all of them just ignore the values or return null. I wonder if I should use regular javascript instead? Any help at all is appreciated.
Code description:
onSubmit{
if (sub_cat != '-10') {
location_names.value = sub_cat.value;
}
else {
// do nothing
}
}