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.

New Custom Registration Field Form

Home Forums Community Forum New Custom Registration Field Form

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

Topic Author Topic
Posted: Monday Nov 12th, 2012 at 5:42 pm #31365
David Welch
Username: dwbiz05

Where is the code for the admin form to create new custom registration fields?

I’m trying to make some adjustments, but I’m getting a javascript error, so where are the javascript “value check” functions for that form as well?

Thanks,

Dave

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Monday Nov 12th, 2012 at 8:47 pm #31398
David Welch
Username: dwbiz05

ok so this code is all generated by the .js file… not cool.

Why is this stuff hard coded so that it can’t be manipulated like so much else in S2?

argh…

Any thoughts on how to work with this?

Dave

Posted: Tuesday Nov 13th, 2012 at 2:39 am #31423
Raam Dev
Username: Raam
Staff Member

Hi David,

Are you referring to Dashboard -› s2Member® -› General Options -› Registration/Profile Fields, on the WordPress Dashboard-side? Could you please explain what you’re trying to do?

Posted: Tuesday Nov 13th, 2012 at 4:14 am #31433
David Welch
Username: dwbiz05

OK…

So what I was trying to do, is change the way S2 handles the level filtering for showing custom registration form fields.

S2 currently lets you show or hide custom fields based on the shortcode level. However, I was wanting to add the ability to show or hide custom fields by the level and/or the shortcode ccap.

Since the form field info for the admin settings is hardcoded into the JS file, I didn’t want to manipulate that…

So… I chose to write my own little plugin that works around the situation by setting a $_SESSION data for the shortcode level and ccap info, then checks it when the ws_plugin__s2member_custom_fields_configured_at_level hook is called. Any rules that have been set for a particular level and ccap grouping is removed from the $fields_applicable variable before it is sent to the “form creation.”

I’ve uploaded the plugin to my website if anyone wants to try it out: http://itelves.com/wp-content/uploads/2012/11/s2member-registration-custom.zip

Once activated, the plugin will show up in the S2Member menu as “Custom Reg Fields”

Thanks,
Dave

Posted: Tuesday Nov 13th, 2012 at 7:25 pm #31508
Raam Dev
Username: Raam
Staff Member

Fantastic. Thank you very much for explaining and sharing your solution, David. I think that’s the best way to achieve what you’re trying to do. The admin JS, if I remember correctly, loads the way it does so that s2Member can optimize it through the s2member-o.php script.

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