latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Registration Code for Free Registration Form

Home Forums Community Forum Registration Code for Free Registration Form

This topic contains 3 replies, has 2 voices. Last updated by  Raam Dev 4 years, 5 months ago.

Topic Author Topic
Posted: Monday Jul 23rd, 2012 at 11:01 am #19993

I am trying to set up a Free Registration Form that includes a “Registration Code” input field that when a value is entered and submitted the user is allowed access to specific pages. I would like to keep only one Member Level (Level 1), but allow users that enter the correct registration code have access to a few extra pages.

I have successfully used Free Registration forms in the past (I have a Pro account), but cannot figure out how to add this option to the form (if it is possible). The “Coupon Code” doesn’t seem to fit my needs, but I may be missing something very simple.

Thanks

  • This topic was modified 4 years, 5 months ago by  Eduan. Reason: Moved to the customer support forums

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday Jul 25th, 2012 at 12:25 am #20139
Raam Dev
Username: Raam
Staff Member

Hi Michele,

There isn’t currently a way to do this through the Custom Registration/Profile Fields. However, it’s certainly possible.

To give specific users access to additional pages, you’ll want to give those extra pages specific Custom Capabilities and then assign those users the Custom Capabilities for the pages you want to give them access to. Please see this video for more on Custom Capabilities.

To automatically assign new users one or more Custom Capabilities, you simply add those Custom Capabilities to the ccaps=”” attribute in your Free Registration shortcode. When the user signs up with that Free Registration form, they’ll automatically get those Custom Capabilities and therefore have access to the pages restricted to them.

The easiest way to handle the various sign up forms (each configured to assign different Custom Capabilities) is to create separate signup pages for each form and then direct the user to the correct page. However, you can also use Dynamic Shortcode Attributes to configure one signup form differently depending on the variables you pass to it.

To process the “Registration Code” from the user, you’ll need to create a separate page (a page that comes before the actual registration form) that does the work of validating the Registration Code. If the code is valid, you can send the user to the correct Free Registration form that has been pre-configured (or gets dynamically configured) with the correct Custom Capabilities.

You should be able to follow the Offering a Free Coupon Code KB article and use the examples there to create a solution for your Registration Code scenario, as they are quite similar. However, if you’re not comfortable with PHP you may want to hire a programmer to implement this (we recommend posting a job at jobs.wordpress.net).

Posted: Wednesday Jul 25th, 2012 at 12:48 am #20142

Hi Raam,

Thanks for the thorough reply! I’ll give this a shot and let you know how it works out.

Michele

Posted: Wednesday Jul 25th, 2012 at 8:24 pm #20244
Raam Dev
Username: Raam
Staff Member

Glad to help, Michele! Let us know how it goes.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.