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.

Pass Aweber Data To Thank You Registration Pg

Home Forums Community Forum Pass Aweber Data To Thank You Registration Pg

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

Topic Author Topic
Posted: Thursday Jun 28th, 2012 at 7:12 pm #17803

Hello,

I am currently using an Aweber form on the first page of my optimizepress site with s2 member. When a customer submits the form, it automatically directs them to a level 0 s2member registration page as the thank you page.

I need for the data submitted in the Aweber form to be passed to the registration form, so that the first and last name as well as email are auto-populated on the registration page.

I am 3/4’s of the way there, as I have already configured Aweber and my “Thank You Page”/s2registration page to pass and receive the appropriate data.

In order to do this I am using the Mindvalley POST and GET Variables Plugin and the following short codes:

[get_var name=”custom_first”]

[get_var name=”custom_last”]

[get_var name=”email”]

I have placed these short codes in my “Thank You”/Registration page to see if they work, and they do collect the appropriate “passed” data from the Aweber form on the page before.

However, the information is simply posted to the bottom of the “Thank You/Registration page, and I need for this information to be posted in the corresponding fields on the registration page as opposed to just at the bottom (or wherever I put the code on the page). Obviously I can’t just stick a Get variable snippet in the form shortcode, thus is my problem.

I believe that I will need to alter the Paypal-Registration-Form.php in the s2member pro templates, however, I do not want to harm the functionality of the form by arbitrarily inserting code. Any nudge in the right direction would be greatly appreciated.

The website is http://faithfitcamps.com

If you would like to test it, simply submit a test account in the autoresponder form on the homepage. You will be directed to the Thank You/Registration page where you will see that your test information has been successfully passed, however, it will not be populated in the corresponding form fields on the registration form.

I am sure this is a fairly easy tweak within the proper php template. I just need to know where to post the “GET variable” snippet in the code.

Thanks again,

Skylar Webber

  • This topic was modified 4 years, 6 months ago by  Skylar Webber.
  • This topic was modified 4 years, 6 months ago by  Skylar Webber.
  • This topic was modified 4 years, 6 months ago by  Skylar Webber.
  • This topic was modified 4 years, 6 months ago by  Skylar Webber.
  • This topic was modified 4 years, 6 months ago by  Skylar Webber.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Jun 30th, 2012 at 1:49 am #17905

Hi Skylar.

Jason once posted a hack to dynamically populate a custom profile field. It may help you find a way to pre-populate the username and email fields. http://www.primothemes.com/forums/viewtopic.php?f=4&t=2822#p8403

Editing the pro-form’s template is another one I’d try. Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?

I hope it helps. :)

Posted: Saturday Jun 30th, 2012 at 9:35 am #17954

Christian,

Thank you so much for your response. Unfortunately that particular tutorial is for setting a default value in a “custom” field using options from a drop down menu, and the link to the video tutorial that is said to explain it all is not valid.

The fields that I am trying to populate are not “custom” fields. I need to populate the default “First Name”, “Last Name” and “Email” fields on the free registration form, using the information that is being passed from an Aweber form on the prior page.

I am quite sure that it can be done, however, I simply lack the coding knowledge to know exactly what form in the loop to add the “Get” Variable code to, and I am unsure of the proper syntax to use as well.

I have tried editing the /s2member-pro/includes/templates/forms/paypal-registration-form.php, but to no avail. Until now I have had a very easy time making the proper modifications for my project, and I have thoroughly enjoyed the S2member plugin. This is the last tweak that I need to make before launch, and I would greatly appreciate any other insight that you or Jason could shed on the topic for me, as my main reason for purchase was because of the awesome customer support.

Thank you in advance, without your answers to the many topics in this forum, I would not have been able to make this site work.

Skylar

Posted: Saturday Jun 30th, 2012 at 10:09 am #17959

I think I can make this super easy… is there any way that I can modify this code on the /s2member-pro/includes/templates/forms/paypal-registration-form.php form:

input type="text" aria-required="true" maxlength="100" autocomplete="off"
 name="s2member_pro_paypal_registration[first_name]" id="s2member-pro-paypal-registration-first-name"
 class="s2member-pro-paypal-first-names2member-pro-paypal-registration-first-name" 
 value="%%first_name_value%%" tabindex="10" /

so that the:

value= “Get” (Aweber Variable from previous page)

or is this the wrong place to edit?

Hope this makes sense.

Thanks

Skylar

Posted: Saturday Jun 30th, 2012 at 11:54 am #17966

ISSUE RESOLVED

I was able to edit /s2member-pro/includes/templates/forms/paypal-registration-form.php as follows:

input type="text" aria-required="true" maxlength="100" autocomplete="off"
 name="s2member_pro_paypal_registration[first_name]" id="s2member-pro-paypal-registration-first-name"
 class="s2member-pro-paypal-first-names2member-pro-paypal-registration-first-name" 
 value="%%first_name_value%%" tabindex="10" /

I used the following tag to autopopulate the appropriate field by changing the value:

value="<?php echo $_GET['URL_Variable_That_You_Need'] ?>"

This pulls the passed Aweber data from the URL and places it in the name field. In order to autopopulate the other default fields, simply make your way down the /s2member-pro/includes/templates/forms/paypal-registration-form.php, and replace each field’s value with the aforementioned code snippet. (obviously you have to change the name of the variable to the variable that you are pulling out of the URL)

Just thought I would share this here in the knowledge base in case it ever comes up again.

Thanks,

Skylar

Posted: Sunday Jul 1st, 2012 at 9:47 pm #18050

Thanks for sharing it. I’m glad you found a solution that you’re happy with. :)

What I suggested before, the hack that dealt with the custom profile fields, but I thought it’d give you an idea to populate the other fields as well. The s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php file has the code that replaces [hilite mono]%%first_name_value%%[/hilite] with what you have in [hilite mono]$_POST["s2member_pro_paypal_checkout"]["first_name"][/hilite] for signups, or [hilite mono]$_POST["s2member_pro_paypal_registration"]["first_name"][/hilite] for free registrations. So you could have a hack that hooked on to wp_loaded and populated that post var with the input you got from the AWeber subscription.

But having a custom template for the pro-form is also fine. Make sure you made a copy of the template and have it in your theme’s folder, so it doesn’t get overwritten the next time you update the plugin.

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