I want to use a Regular Expression(regex) to test the value of a form's zipcode field on a WordPress page, then based upon those results either:
Selectively assign/reveal price fields on the same page.
or
Selectively redirect user to a page having the result-specific pricing.
Here's the regex and the js pseudo-code skeleton.
var zip5 = event.value.toString();
var myRegExp = /^92(2|3|5)/;
if ( zip5.length === 5 && myRegExp.test(zip5))
{
// Code to assign/display price set #1 on same page...or
// Code to move to Wordpress Page with Price Set #1
}
else
{
// Code to assign/display price set #2 on same page...or
// Code to move to Wordpress Page with Price Set #2
}