Text Field Match Substring and convert to uppercase
-
Hi,
I have a text field where customers can input their postcode. I want to match the first two characters of the inputted postcode against a value.
E.g. a customer could enter MK45 which would return a value of 300 but I want to just match just the first two cahracters, in this case MK, but allow the customer to enter the full postcode i.e MK45 5HH.
(function(){
if((fieldname373 == ‘MK’) || (fieldname373 == ‘SG’)) return 300;
if((fieldname374 == ‘HA’) || (fieldname374 == ‘W1’)) return 500;
})()Also, is there a way for the string entered in the text field to be converted to uppercase so that even if the customer enters their postcode in lowercase it is still checked?
Thanks in advance!
Catherine
- The topic ‘Text Field Match Substring and convert to uppercase’ is closed to new replies.