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.

Custom Fields for Pro Forms (signed in user)

Home Forums Community Forum Custom Fields for Pro Forms (signed in user)

Tagged: 

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

Topic Author Topic
Posted: Tuesday Aug 13th, 2013 at 6:43 pm #55703

I am trying to display the custom user fields on the s2Member Pro form(s) for users when they sign up for a new Level 1 account or when they upgrade from free to Level 1. I would like the custom fields to display regardless of whether the user is signed in or out. The reason behind wanting to do this is that we don’t want to collect extra data from free users (who only have access to the forums) but we do want to require extra address and personal information from users who want to join the club/association.

I’ve found a number of forum posts asking for help with similar functionality but I’m still struggling a bit.

I think the easiest approach for me is the one similar to this thread
http://www.s2member.com/forums/topic/custom-fields-in-s2member-pro-form/#post-4381
in that I would like to not hide the custom fields that are already generated in the form and then have them processed when the form is submitted (rather than create a whole new set of form fields). Though I am open to other solutions and programming is not a problem.

Can anyone provide more detail on how to make the paypal.js changes as line 623 has changed since the above post was originally created over a year ago.

And any suggestions where to hook in to save the custom form fields would be greatly appreciated too.

We’re only using PayPal (no credit card processing onsite at this time) and also have BuddyPress and bbPress installed.

Thanks,
Karla

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Aug 15th, 2013 at 10:00 pm #55961
Bruce
Username: Bruce
Staff Member

Can anyone provide more detail on how to make the paypal.js changes as line 623 has changed since the above post was originally created over a year ago.

I am not aware of any changes to the way that this can be accomplished. I will contact Jason on his thoughts on this. Thanks for your patience.

Posted: Thursday Aug 15th, 2013 at 10:26 pm #55966

Hi Bruce,

Not sure if my original post was entirely clear … what I meant to be saying about line 623 in paypal.js is that I believe there have been a number of changes to the file in the past year or so (since the original topic was posted) so that line 623 today is not the same line of code as it was a year ago.

If you or Jason know what the current line number is or can provide a little more context within paypal.js so that I can find the right line to change that would be greatly appreciated.

Thanks,
Karla

Posted: Thursday Aug 15th, 2013 at 11:01 pm #55972
Bruce
Username: Bruce
Staff Member

Thanks for your patience.

I contacted Jason and he described how this works to me. Here’s what he described for changing the processes in the paypal.js file:

If you look inside paypal.js you will find references to handleExistingUsers which wraps together several routines that auto-fill some fields for users who are already logged in. Modifying those routines (for checkout forms it’s around line 666 in the latest release); and remove things that call .hide() may help some.

Any changes you make to the paypal.js file will not be reflected on your site, unless you save the file as paypal-min.js.

That is about all we can go into as far as the JavaScript portion of this goes. I will reiterate what Jason mentioned in his reply in the thread here:

http://www.s2member.com/forums/topic/custom-fields-in-s2member-pro-form/#post-4381

Any data that is collected from an existing customer for Custom Registration/Profile Fields will be ignored by s2Member. So, if you need to use this information again, you would need to hack that in with Hooks/Filters of your own perhaps

s2Member is not expecting to get any Custom Registration/Profile fields when a User submits a modification form, so s2Member won’t save any of the fields that you just allowed be shown by editing the JavaScript file. You will need to add this functionality through hooks and filters to accomplish this.

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters


We’ll take this as feedback on s2Member Pro, as it’s not currently possible to accomplish this easily. I’m giving you a brief outline of what will be needed for you to accomplish this but I can’t go past that at this point. I’m moving this thread to the Community Forums where it will be more likely that someone in the community can help give you some information on accomplishing this. :-)

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.