Reply To: Assign membership level based on a condition (zipcode)?
› Forums › General › Assign membership level based on a condition (zipcode)? › Reply To: Assign membership level based on a condition (zipcode)?
2016-01-08 at 18:49
#566
Cristián Lávaque
Keymaster
Sorry for the delay.
The s2 pro-form doesn’t have a way to change dynamically based on the zip code entered into it as a the value of one of the profile fields. But it is possible to have a previous step for the zip code, to then show the proper form based on it.
You could have a simple HTML form for the user to enter his zip code, and submit it to the page with the pro-form, but with a PHP conditional that checks the zip code entered to display the form you want. E.g.
<?php
if (isset($_REQUEST['zip'])) {
if ($_REQUEST['zip'] < 12345) {
Sorry, you can't enter.
} elseif ($_REQUEST['zip'] > 12345 && $_REQUEST['zip'] < 23456) {
Registration form
}
}
?>
I hope that helps 🙂