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)?

#566

Deprecated: wp_make_content_images_responsive is deprecated since version 5.5.0! Use wp_filter_content_tags() instead. in /nfs/c09/h02/mnt/138233/domains/s2member.net/html/wp-includes/functions.php on line 4777

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 🙂