PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Form Validation

s2Member Plugin. A Membership plugin for WordPress®.

Form Validation

Postby Stephem » January 7th, 2012, 1:02 am

Hey guys,

I have yet another question. I'm looking to make the validation process a little more advanced when it comes to the Paypal Pro forms.

As you know, by default the s2Member javascript uses a simple popup box with the "Oops you've missed something" error.

Is there a way i can remove this, allowing the use of a custom built jquery validation script to be used instead?
User avatar
Stephem
Registered User
Registered User
 
Posts: 16
Joined: January 2, 2012

Re: Form Validation

Postby xigaogen » January 7th, 2012, 4:02 am

Maybe you can check and repair the file:
wp-content\plugins\s2member\includes\s2member-min.js

Hope this can help you.
User avatar
xigaogen
Registered User
Registered User
 
Posts: 20
Joined: October 27, 2010

Re: Form Validation

Postby Cristián Lávaque » January 7th, 2012, 6:19 am

Have you tried using a custom pro-form template and changing the form's IDs? I'm not sure if that'll work, but that's what I'd try first.

Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?

Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won't get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you're using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Form Validation

Postby Stephem » January 11th, 2012, 5:11 am

Hey Christian,

I have edited the paypal-checkout-form.php file by firstly removing the "aria-required" field from the inputs, as well as adding a class related to my validation script. It's working.

The problem is i need to apply these changes to my custom fields also, but it appears as though the custom fields HTML is generated in another file. Which file would this be?
User avatar
Stephem
Registered User
Registered User
 
Posts: 16
Joined: January 2, 2012

Re: Form Validation

Postby Stephem » January 11th, 2012, 5:51 am

Follow up,

I'm blind. I found the file to edit the custom fields (custom-reg-fields.inc.php). I included it in the mu-plugins folder so it wouldn't be overwritten with future updates.

I do have one small problem though. When the 'submit' button is clicked the custom validation script works correctly, but the submit button changes to "Processing..." and repeats itself.

It doesn't change from this state, so even if the form is filled out correctly the submit button no longer works. How would i go about correctly this? Sorry about all the questions!
User avatar
Stephem
Registered User
Registered User
 
Posts: 16
Joined: January 2, 2012

Re: Form Validation

Postby Cristián Lávaque » January 12th, 2012, 6:36 am

If you remove the customizaiton in the mu-plugins directory, do you still have that problem? If so, then it may be caused by another plugin, if not then there's something in the customization you wrote that's causing it. If the latter, could you post the code here, please?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Form Validation

Postby bitofgrace » January 12th, 2012, 8:26 am

Hi-
I was searching for a way to make a custom field require validation against an invitation code list.
(i'm inviting users to the free reg form - while the system is not open reg. they're given a code to come activate with)
But i have no way of automating the code validation.

Is coding a separate process the only way to go about it?
User avatar
bitofgrace
Registered User
Registered User
 
Posts: 64
Joined: September 8, 2011

Re: Form Validation

Postby Stephem » January 12th, 2012, 8:09 pm

Cristián Lávaque wrote:If you remove the customizaiton in the mu-plugins directory, do you still have that problem? If so, then it may be caused by another plugin, if not then there's something in the customization you wrote that's causing it. If the latter, could you post the code here, please?


Thanks for the reply.

There's nothing in the customization that's causing it, it's part of the s2Member javascript. I've looked in the file and being relatively new to javascript i do not know how to remove it.

You can view what i'm talking about here:

http://stephenjohnmartin.com/spa/membership/supporter/

By clicking submit without entering anything into the form, the validation script works, but the "Processing" action causes the form submission to break.
User avatar
Stephem
Registered User
Registered User
 
Posts: 16
Joined: January 2, 2012


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 7 guests

cron