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.

Prepopulate fields in Registration

Home Forums Community Forum Prepopulate fields in Registration

This topic contains 3 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Friday Feb 17th, 2012 at 5:27 am #5475

Hi,

I want people first to subscribe to my list, and then to become a free member.

What I am trying to accomplish it to GET the name and email from the query string returned by Aweber. I wonder if this could maybe be accomplished by creating some kind of themplates and with something similar to

[s2Member-Pro-PayPal-Form ...template="registration_getaweberinfo.php" /]

?

Thanks!
Santi

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Feb 17th, 2012 at 8:36 pm #5539
Raam Dev
Username: Raam
Staff Member

Hi Santi,

You can set up List Integration for Free Subscribers (WP Admin -> s2Member -> API/List Servers -> AWeber Integration) and then create a Free Registration Form (WP Admin -> s2Member -> PayPal Pro-Forms -> PayPal Pro / Free Registration Forms).

Then when your free users sign up via the form, their account will be created and they will automatically be subscribed to the AWeber list that you configured.

Will that work?

Posted: Saturday Feb 18th, 2012 at 3:14 pm #5603

No, that was not the idea, the idea is to First subscribe to my list, and then become a free member, if they are so inclined.

I did figure it out anyway, so I will post for the benefit of anybody that comes across this dilemma.

Short answer to my question above was “yes”, as I figured out from this forum response from Cristián. Nevertheless, there was a problem: Aweber sends back in the query string the variable name and WP does not like it, it yields a 404. So here are the steps I took to solve this problem:

  1. In theme functions, I added:
    add_action('init','change_querystring_name');	
    
    function change_querystring_name() {
    if(isset($_GET['name'])){
    	$_GET['aname'] = $_GET['name'];
    	unset($_GET['name']);
    	}
    }

    That take care of the 404 when you post back from Aweber, plus it allows you to use ‘aname’ variable in the code.

  2. As suggested above, open a copy of wp-content/pluging/s2member-pro/includes/templates/forms/paypal-registration-form.php
  3. Modify to your liking, including, for example
    <input name="[email]" [...] value=" [php echo $_GET['email']; ] "> 
  4. Save on your theme folder and call from shortcode as per my original question.

Hope this helps someone.

  • This reply was modified 4 years, 10 months ago by  Santi Azpilicueta.
  • This reply was modified 4 years, 10 months ago by  Santi Azpilicueta.
  • This reply was modified 4 years, 10 months ago by  Santi Azpilicueta. Reason: Making code readable (php was being stripped out)
Posted: Monday Feb 20th, 2012 at 5:54 pm #5743
Staff Member

Thanks for sharing that. Nice work!

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.