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.

Remove second password field on registration

Home Forums Community Forum Remove second password field on registration

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

Topic Author Topic
Posted: Saturday Aug 10th, 2013 at 3:09 pm #55528
Pete
Username: anagio

I’d like to remove the second password field on the paypal registration form. I’ve copied the php file to my theme folder to make the modifications, but I see there is javascript validation coming from s2member.js checking that the passwords match. Will I have to modify the javascript file to make this work or can I hook into the form some how, if so what would an example be?

Thanks

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Aug 12th, 2013 at 11:58 pm #55612
Bruce
Username: Bruce
Staff Member

Will I have to modify the javascript file to make this work or can I hook into the form some how, if so what would an example be?

Yes. You’ll need to edit the JavaScript file here to accomplish this:

/s2member/includes/s2member-min.js

Which is a minimized version of this file:

/s2member/includes/s2member.js

I believe you’re looking for this section of the code, on line 85 in the un-minimized file:

else if ($.trim ($password1.val ()) && $.trim ($password1.val ()) !== $.trim ($password2.val ()))
							{
								alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');

								return false;
							}
That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
Posted: Tuesday Aug 13th, 2013 at 3:48 am #55619
Pete
Username: anagio

Thanks Bruce, I figured i’d have to re-minify the file. Is there a best practice when modifying the js file, any way to override it? Or will I have to just keep track of changes before future updates?

Posted: Tuesday Aug 13th, 2013 at 5:23 am #55644
Bruce
Username: Bruce
Staff Member

Thanks Bruce, I figured i’d have to re-minify the file. Is there a best practice when modifying the js file, any way to override it? Or will I have to just keep track of changes before future updates?

You can minify the file using this tool, or you can simply change the name of the file to s2member-min.js:

http://refresh-sf.com/yui/

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.