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 form

Home Forums Community Forum Registration form

This topic contains 22 replies, has 4 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Tuesday Jul 17th, 2012 at 2:22 pm #19544

I am unable to setup the registration form the way my client wants. What they want is simple and straightforward registration form. They have six membership types (ranging in price from $20 a year to $500 a year) and I need them listed on the registration form in either a drop-down or radio buttons. These membership types are all under Level 1 membership.

The other thing I can’t figure out is why no registration form appears when I use the PayPal buttons (is that the norm to have just a button and no registration fields?). But when I use the PayPal pro-form, the registration form asks for the users credit card info directly on the form. My client cannot accept credit cards directly and although the cards are grayed out (by using accept=”paypal” in the shortcode), this still looks unprofessional. My client doesn’t want credit card fields on the registration form.

If these issues cannot be easily resolved (without a ton of custom programming which I can neither do nor want to pay for), then unfortunately, 2Member is not going to work for my client. IF that is the case, please let me know what steps to take to receive a refund. Thank you!

List Of Topic Replies

Viewing 22 replies - 1 through 22 (of 22 total)
Author Replies
Author Replies
Posted: Tuesday Jul 17th, 2012 at 5:45 pm #19563
Stuart Giles
Username: Juggy69

Hi Jennifer,

If you would like i can try and help you with a better explanation

I also notice that you state the client can not except Credit Cards, if they have a PayPal Pro account then this i believe is not a problem unless i am mistaken

With regards to refunds as this is Digital Media i doubt there is any offer of a refund, as there is no way to stop any user from using the product

Regards

Stuart

Posted: Tuesday Jul 17th, 2012 at 7:13 pm #19565

Stuart-

Thank you for offering assistance. The client does not have PayPal Pro (which requires a monthly fee). They use the standard free PayPal merchant account (which only charges by the transaction). But according to the instructions with s2Member, one need not have PayPal Pro to use the PayPal Pro forms. But I don’t understand how to create a registration form.

I set up a sandbox account in PayPal and tested it with both a fake PayPal pro account and a fake regular business account. Regardless of which fake account I use, I only get a registration form generated if I use the PayPal pro-forms and not if I use the PayPal button generator. But the registration form generated using the PayPal pro-forms has fields for credit card info that the client doesn’t want on the form. ???

Jennifer

Posted: Wednesday Jul 18th, 2012 at 4:32 am #19589
Stuart Giles
Username: Juggy69

Hi Jennifer,

In the form generator see below

[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="New Member / Description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.yourdomain.com" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

If you remove these “visa,mastercard,amex,discover,maestro,solo” from the line they should provide the option to not use cards

Regards

Stuart

  • This reply was modified 4 years, 5 months ago by  Stuart Giles.
  • This reply was modified 4 years, 5 months ago by  Stuart Giles.
Posted: Wednesday Jul 18th, 2012 at 7:35 am #19623

Hi Jennifer.

The other thing I can’t figure out is why no registration form appears when I use the PayPal buttons (is that the norm to have just a button and no registration fields?). But when I use the PayPal pro-form, the registration form asks for the users credit card info directly on the form. My client cannot accept credit cards directly and although the cards are grayed out (by using accept=”paypal” in the shortcode), this still looks unprofessional. My client doesn’t want credit card fields on the registration form.

The button is just that, a payment button, it’s not a registration form. The pro-form combines registration with payment, though.

Stuart is correct about the [hilite mono]accept[/hilite] attribute in the pro-form, change the value to just [hilite mono]"paypal"[/hilite] and then the pro-form will only have the option to pay via Express Checkout, which is free too, similar to PayPal Standard.

Then you won’t need the Billing Method section in your pro-form, so you may want to hide it with this style in your theme’s style.css file:

[hilite pre_code]
div.s2member-pro-paypal-form-billing-method-section {display: none;}
[/hilite]

They have six membership types (ranging in price from $20 a year to $500 a year) and I need them listed on the registration form in either a drop-down or radio buttons. These membership types are all under Level 1 membership.

The pro-form or button still don’t have a way to select different payment plans. One thing you can do is create an extra HTML form right before the pro-form, with your payment plan options in a way that when the user picks one, that form gets submitted automatically to the same page, and you’d have some PHP code to check what the user’s choice was and update the shortcode for the pro-form. http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 2:05 pm #19654

Cristian – hiding the credit card section with CSS worked. Thanks.

As for the link you provided, I’d looked at it before, and it makes no sense to me. I don’t even know where to start. Unless there is a tutorial, I cannot do this.

I’ve also discovered two additional abilities that s2Member doesn’t provide. My client wants to be able to search users by the custom fields we created on the Registration Form. The built-in WordPress search box searches ALL fields and that returns too many users we aren’t looking for.

The other ability we want is to be able to export ALL users in one shot (not be limited to 250 at a time).

I’m disappointed that s2Member cannot achieve what we need, particularly because I have already put in SO much time trying to get this plugin to work.

Posted: Thursday Jul 19th, 2012 at 5:31 am #19750

As for the link you provided, I’d looked at it before, and it makes no sense to me. I don’t even know where to start. Unless there is a tutorial, I cannot do this.

Right, that’s a customization and you need to know how to code a bit, or have/get someone that does.

My client wants to be able to search users by the custom fields we created on the Registration Form. The built-in WordPress search box searches ALL fields and that returns too many users we aren’t looking for.

Right, the Users list in the admin area doesn’t search by those fields, but there’s a plugin for users lists that works with those fields. It mentions filtering, but not searching specifically, so you may want to contact the developer to confirm that.

http://wordpress.org/extend/plugins/amr-users/
http://wpusersplugin.com/3086/user-lists-and-filtering-with-s2member-fields/

The other ability we want is to be able to export ALL users in one shot (not be limited to 250 at a time).

The limit is there to avoid script timeouts, but you can try removing it in your installation editing the file that does the exportation work. s2member-pro/includes/classes/exports-in.inc.php

Look for this line:

[hilite pre_code]
if (is_array ($_users = $wpdb->get_results ("SELECT `" . $wpdb->users . "`.`ID` FROM `" . $wpdb->users . "`, `" . $wpdb->usermeta . "` WHERE `" . $wpdb->users . "`.`ID` = `" . $wpdb->usermeta . "`.`user_id` AND `" . $wpdb->usermeta . "`.`meta_key` = '" . esc_sql ($wpdb->prefix . "capabilities") . "' LIMIT " . $sql_s . ", 250")))
[/hilite]

and remove the [hilite code] LIMIT " . $sql_s . ", 250[/hilite] part near the end. I haven’t tested this, I don’t have an installation with that many users, but I think it’ll work.

I hope that helps. :)

Posted: Friday Jul 20th, 2012 at 9:20 pm #19866

This may not be the most efficient way, but I wanted to post how I accomplished having multiple membership types in a dropdown.

(1) Install the WP plugin PHP Execution by Nicolas Zeh (note: this plugin has not been updated in over 2 years, but none of the other php plugins I tried worked with s2Member).

(2) Create a form with select element in HTML view on a WP page. To have the form submit to itself, set action=”” in the form tag.

(3) In the s2Member shortcodes, the only attributes I changed for each membership type was the description (desc) and the amount (ra).

Please select membership level:

Student/Senior $20.00 yearly Basic $35.00 yearly Not-For-Profits $50.00 yearly Business $75.00 yearly Patron $100.00 yearly Benefactor $500.00 yearly

Posted: Friday Jul 20th, 2012 at 9:34 pm #19867

Okay, I’m gonna need help with this … just as with another method I followed on this support forum (using CSS and jQuery to “hide” the extra registration forms), the above method fails to display the success message.

I also tried creating the s2-hacks.php as per http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604 and I received an error message about the header already being sent.

Can somebody please provide the actual code for displaying membership types in a dropdown? Somebody MUST have already done this.

Posted: Saturday Jul 21st, 2012 at 6:49 am #19885

I also tried creating the s2-hacks.php as per http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604 and I received an error message about the header already being sent.

Make sure you don’t have spaces or line breaks outside the PHP tags. The very first and last things in your s2hacks.php file are [hilite mono][/hilite] respectively.

Can somebody please provide the actual code for displaying membership types in a dropdown? Somebody MUST have already done this.

Could you post the code you tried in the form and the hack, please? Thanks. :)

Posted: Saturday Jul 21st, 2012 at 11:02 am #19902

If I use the s2-hacks.php, what do I put on the membership page? I have the following, but then it gives an error because the s2member shortcode doesn’t have values for the php variables yet. If I use php code to only show the s2member code AFTER the user selects a membership type from the dropdown, then the success message doesn’t display on the page once the user is routed back from PayPal.

Please select membership level:

Student/Senior $20.00 yearly Basic $35.00 yearly Not-For-Profits $50.00 yearly Business $75.00 yearly Patron $100.00 yearly Benefactor $500.00 yearly

[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.jdaviswebdesign.com" ta="0" tp="0" tt="D" ra="" rp="1" rt="Y" rr="1" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]
Posted: Saturday Jul 21st, 2012 at 11:02 am #19903

This is my s2-hacks.php …

Posted: Saturday Jul 21st, 2012 at 11:24 am #19905

I am trying this AGAIN with the s2-hacks.php. I removed the white space. Now, my membership page gives the following error:

Invalid form configuration. Missing “desc” attribute. Please provide a Description for this form.

But “desc” is one of the attributes defined in my s2-hacks.php:

Posted: Saturday Jul 21st, 2012 at 9:00 pm #19917

I’m trying to include this again … This is what is on my membership page

Please select membership level:

<form action="" method="post" name="form1"><select name="mlevel"> <option></option> <option value="level1">Student/Senior $20.00 yearly</option> <option value="level2">Basic $35.00 yearly</option> <option value="level3">Not-For-Profits $50.00 yearly</option> <option value="level4">Business $75.00 yearly</option> <option value="level5">Patron $100.00 yearly</option> <option value="level6">Benefactor $500.00 yearly</option> </select> <input type="submit" name="membershiplevels" value="Select" /></form>

<?php if($_POST['membershiplevels']) {
echo '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="<?php echo esc_attr($_POST["desc"]); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.jdaviswebdesign.com" ta="0" tp="0" tt="D" ra="<?php echo esc_attr($_POST["ra"]); ?>" rp="1" rt="Y" rr="1" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
} ?>
Posted: Saturday Jul 21st, 2012 at 9:01 pm #19918

And this is in my s2-hacks.php file …

<?php add_filter ("ws_plugin__s2member_pro_paypal_checkout_post_attr", "my_paypal_pro_checkout_form_attr");
    function my_paypal_pro_checkout_form_attr ($attr = array ()) {
            if ($_POST["membershiplevels"] === "level1") {
					$attr["desc"] = "Student/Senior $20 USD per year";
                    $attr["ra"] = "20.00"; /* Adjust price dynamically. */
            }
            if ($_POST["membershiplevels"] === "level2") {
					$attr["desc"] = "Basic $35 USD per year";
                    $attr["ra"] = "35.00"; /* Adjust price dynamically. */
            }
            if ($_POST["membershiplevels"] === "level3") {
					$attr["desc"] = "Not-For-Profit $50 USD per year";
                    $attr["ra"] = "50.00"; /* Adjust price dynamically. */
            }
            if ($_POST["membershiplevels"] === "level4") {
					$attr["desc"] = "Business $75 USD per year";
                    $attr["ra"] = "75.00"; /* Adjust price dynamically. */
            }
            if ($_POST["membershiplevels"] === "level5") {
					$attr["desc"] = "Patron $50 USD per year";
                    $attr["ra"] = "100.00"; /* Adjust price dynamically. */
            }
            if ($_POST["membershiplevels"] === "level6") {
					$attr["desc"] = "Benefactor $500 USD per year";
                    $attr["ra"] = "500.00"; /* Adjust price dynamically. */
            }
            return (array)$attr;
        } ?>
        
Posted: Monday Jul 23rd, 2012 at 4:58 am #19965
Raam Dev
Username: Raam
Staff Member

Hi Jennifer,

The first problem I see with your code is that you keep referencing $_POST[‘membershiplevels’], however in the actual form that submits the selected membership level, the select box is called mlevel, not membershiplevels.

If that’s the select name you want to keep, then you should change $_POST[‘membershiplevels’] to $_POST[‘mlevel’] wherever it occurs in your code, otherwise you can simply change <select name=”mlevel”> to <select name=”membershiplevels”>.

The submit button is currently named membershiplevels, which does absolutely nothing (you’re not using the value of the submit button for anything). I recommend changing the submit button name to simply submit.

Posted: Monday Jul 23rd, 2012 at 10:31 am #19990

Raam – Okay, I fixed that, but I still can’t get the registration form to show without errors. I get the error “Invalid form configuration. Missing “desc” attribute. Please provide a Description for this form.” And at the end of the registration form is this:

); ?>” ps=”paypal” lc=”" cc=”USD” dg=”0″ ns=”1″ custom=”www.jdaviswebdesign.com” ta=”0″ tp=”0″ tt=”D” ra=”” rp=”1″ rt=”Y” rr=”1″ rrt=”" rra=”2″ accept=”paypal” accept_via_paypal=”paypal” coupon=”" accept_coupons=”0″ default_country_code=”" captcha=”0″ /]

So there must be something wrong with the php code on my membership page? I am guessing something with single quotes and double quotes since s2Member seems to only be reading the shortcode up to the first php variable.

<?php if($_POST["submit"]) {
echo '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="<?php echo esc_attr($_POST["desc"]); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.jdaviswebdesign.com" ta="0" tp="0" tt="D" ra="<?php echo esc_attr($_POST["ra"]); ?>" rp="1" rt="Y" rr="1" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
} ?>
Posted: Monday Jul 23rd, 2012 at 10:39 am #19991

by changing the php code on my membership page to this:

<?php if($_POST["submit"]) { ?>
[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="<?php echo esc_attr($_POST["desc"]); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.jdaviswebdesign.com" ta="0" tp="0" tt="D" ra="<?php echo esc_attr($_POST["ra"]); ?>" rp="1" rt="Y" rr="1" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]
<?php } ?>

I solved the problem of the shortcode not being completed at runtime. However, the s2Member error “Invalid form configuration. Missing “desc” attribute. Please provide a Description for this form.” still exists. The variables in the s2-hacks.php are not being input into the php code on the membership page.

Posted: Tuesday Jul 24th, 2012 at 7:19 am #20040

Jennifer, your form with the payment plan selection doesn’t include a [hilite mono]desc[/hilite] or [hilite mono]ra[/hilite] input tag, so they won’t be in the [hilite mono]$_POST[/hilite] array.

Your hack code is adding those to the [hilite mono]$attr[/hilite] array for the [hilite mono]ws_plugin__s2member_pro_paypal_checkout_post_attr[/hilite] hook, which is something else. That hook is at the point of processing the pro-form for checkout.

If what you want is to reload the page with the pro-form, now updated with the payment plan’s description and amount, you need to use a different thing.

Here’s what you could try in the page itself, without an s2hacks file:

[hilite pre_code]
array('ra' => '20', 'desc' => 'Student/Senior $20 USD yearly'),
2 => array('ra' => '35', 'desc' => 'Basic $35 USD yearly'),
3 => array('ra' => '50', 'desc' => 'Not-For-Profits $50 USD yearly'),
4 => array('ra' => '75', 'desc' => 'Business $75 USD yearly'),
5 => array('ra' => '100', 'desc' => 'Patron $100 USD yearly'),
6 => array('ra' => '500', 'desc' => 'Benefactor $500 USD yearly'),
);

echo '

';

if (isset($_POST['mlevel'])) {
$mlevel = (int) $_POST['mlevel'];
echo '['.'s2Member-Pro-PayPal-Form level="1" ccaps="" desc="' . $mlevels[$mlevel]['desc'] . '" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.jdaviswebdesign.com" ta="0" tp="0" tt="D" ra="' . $mlevels[$mlevel]['ra'] . '" rp="1" rt="Y" rr="1" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
}
?>
[/hilite]

(Had to do the [hilite mono]['.'[/hilite] at the beginning of the shortcode to avoid having it parsed here, sorry.)

I haven’t tested this, so you may need to fix it a bit, but it should give you an idea of what to try.

I hope it helps.

Posted: Tuesday Jul 24th, 2012 at 10:43 am #20085

Thanks Cristian for trying. The array items should be ended with commas rather than semi-colons and a semi-colon is needed after the closing array parenthesis.

But the same problem exists. No message displays to the user indicating the registration was successful.

I have come to the conclusion that s2Member cannot display membership levels or types in a dropdown or radio buttons. And this ends my attempts.

My client cannot wait any longer so we will be purchasing aMember Pro which does exactly what we need right out of the box. Yes, aMember Pro is more expensive than s2Member. But I am disappointed with how much time I have tried to make s2Member work and for something that should be so simple.

Posted: Tuesday Jul 24th, 2012 at 8:39 pm #20116

I’m sorry about the commas/semicolons error, I was too tired and missed that when copy/pasting. I fixed that in my post now.

I just tried the code and it worked fine for me in my test installation, with description and all in the pro-form after picking an option. I don’t know why it didn’t work for you.

I’m sorry it didn’t come the way you wanted it out-of-the-box. That’s why, although I’m not required to, to help you I coded that for you.

Anyway, maybe the current s2Member, or perhaps the new one when we release it later this year, will do all you need for a future project. I hope that’s the case and we’ll be happy to help with what we can. :)

Posted: Wednesday Jul 25th, 2012 at 9:42 pm #20260

Cristian – all that part of it worked, but what didn’t work is the success message upon returning from PayPal. Your test installation might have the buyer entering their credit card info on the registration form. I have that part hidden, since my client didn’t want that. They want users to be directed to the PalPal site to enter credit card information.

Posted: Wednesday Jul 25th, 2012 at 10:10 pm #20264

Oh, you mean the page the person is shown after being returned from PayPal? You can control that with the [hilite mono]success[/hilite] attribute: [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success[/hilite].

Did you try that? :)

Viewing 22 replies - 1 through 22 (of 22 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.