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.

Secret code for registration

Home Forums Community Forum Secret code for registration

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

Topic Author Topic
Posted: Monday Oct 29th, 2012 at 11:09 am #30019

I have searched your forum for about a half hour and cannot find a direct answer to this question. Sorry if this is a re-post. I have not downloaded the plug-in but it looks like it can do the rest of my wish list.

For level 1 membership, I simply want the user to answer a simple question that is not a captcha. The site is for the support of a book (additional learning materials) and I want access restricted to those people that have the book. Any reader of the book would be able to provide the answer easily e.g. first/last word of a chapter.

It appears that I can do this with S2 but not sure. Free version / paid version?

Any hints would be appreciated.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Oct 29th, 2012 at 2:25 pm #30058
Raam Dev
Username: Raam
Staff Member

Hi Sean,

That functionality is not built-into s2Member, but you could certainly incorporate that into the signup process if you’re using the Pro-Forms feature that comes with s2Member Pro (see Is it possible to modify s2Member® Pro Form templates?). However, as this feature is not part of s2Member, you’d need to write your own PHP/JavaScript code that checks if the answer is correct.

Posted: Monday Oct 29th, 2012 at 4:48 pm #30093

Raam –

Thank you for your quick response.

Since I haven’t purchased S2 yet, I am concerned that this will be hard to do. Thoughts on how to do this. I am not a big PHP hacker but can usually follow along and change examples (I write books not code). Can you point me to an example where someone did some logic prior to the membership submit button worked?

Sean

Posted: Tuesday Oct 30th, 2012 at 4:36 pm #30203
Raam Dev
Username: Raam
Staff Member

Hi Sean,

You could use the same concept that is described for Offering a Free Coupon Code (100% Discount), except instead of the “voucher code” providing access to a Free Registration form, the answer provide access to a regular membership signup form.

Here’s a quick example. All of this would go on one page and you’ll need to be using the Exec-PHP Plugin to run PHP on a WordPress page. Make sure you copy/paste this into WordPress using the HTML editor in WordPress, not the Visual editor (you can never use the Visual editor if you’re using the Exec-PHP plugin, as the visual editor messes with the PHP code).

<?php if (isset($_POST&#91;'answer'&#93;) && strtolower($_POST&#91;'answer'&#93;) == "two" ) { ?>
[s2Member-Pro-PayPal-Form ....]
<?php } else { // the answer has not been submitted, or it was incorrect ?>
<form name="question" action="" method="post">
What is 1+1 (please type the word not the number)?: <input type="text" name="answer">
<input type="submit" value="Submit">
</form>
<?php } ?>
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.