Assign membership level based on a condition (zipcode)?

Forums General Assign membership level based on a condition (zipcode)?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #529

    I am strongly considering S2 for my membership site. I need to be able to assign most new members to one level of membership, and a few, based on zip code, to another level. Is this possible using conditionals?

    At this time, I am considering using Gravity Forms on a primary screen, to get the user’s email and zip. A select few zipcodes (competition) would be redirected to a “sorry, not available in your area” page, and the rest would move on in the site.

    So the few could be assigned to one membership level, and the rest to a paid membership level. Can s2 do all of this with 2 s2 forms, or possibly even with 1, where they sign up and the few are redirected?

    So I guess my question is, does S2 use conditionals, and if so, how would I do it without having to use Gravity Forms?


    I think you can do it with a bit of PHP in the page with the form, so it changes the form’s shortcode dynamically to the other level based on your ZIP code conditions.

    The PHP code should be able to pick up the ZIP code you stored in the user’s profile with the Gravity form. I’m not familiar with how it saves profile fields.

    Will create that field with s2Member? WP Admin -> s2Member -> General -> Registration/Profile Fields & Options

    Tell me how you’re saving the ZIP code in the profile, and I’ll try giving you an example shortcode to change the level dynamically.


    Let me tell you the entire thing I am trying to do, and see if s2 can do it all, or if I need to use Gravity Forms initially.

    I will be having 2 landing pages, one on a site that is entirely squeeze page, and one that is a squeeze page on my main site. This is where I will ask for an email address and zipcode. Based on the results of that, users will either be told “not available in your area” (very very few) or move on to, “hooray, you’re eligible, want to buy my product, or just look around”, and be assigned to membership levels based on that.

    So if s2 could do it all, beginning at the 2 entry pages, then I guess there would be a conditional right there based on zip code, and the redirects based on that would handle the rest of the routing. So there would be a very small membership group of “not available in your area”, “pre-pay”, and “subscribers”, plus probably another group of “paused or no longer paying subscribers”.

    What do you think? Can s2 do the whole thing?


    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.

    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 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.