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 Field Validation Problems:-(

Home Forums Community Forum New Field Validation Problems:-(

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

Topic Author Topic
Posted: Monday Oct 15th, 2012 at 9:52 am #28429

Hi there – really desperate for some help on this one!-)

I’ve created my own customised registration form which works fine with the standard field inputs, i.e. first name, last name, email, etc. But when I create a new field in ‘General Options >> Registration/Profile Fields’ and set field required and validation rule, it appears to not do as asked.

I have created a customised template and I have set the field names up similarly to the existing field inputs as mentioned above, example for telephone below, but as said when it comes to submitting form it doesn’t check it exists or validate it.

<div id="s2member-pro-paypal-registration-form-telephone-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-registration-form-div s2member-pro-paypal-form-telephone-div s2member-pro-paypal-registration-form-telephone-div">
            <label for="s2member-pro-paypal-registration-telephone" id="s2member-pro-paypal-registration-form-telephone-label" class="s2member-pro-paypal-form-telephone-label s2member-pro-paypal-registration-form-telephone-label">
             	<span><?php echo _x ("Telephone", "s2member-front", "s2member"); ?> *</span><br />
             	<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_registration[custom_fields][telephone]" id="s2member-pro-paypal-registration-telephone" class="s2member-pro-paypal-telephone s2member-pro-paypal-registration-telephone" value="%%telephone_value%%" tabindex="20" />
            </label>
</div>

It is set to ‘ALL’ membership levels so that is not causing the problem.

Any guidance would be much appreciated.

Kind Regards,

Tony

  • This topic was modified 4 years, 2 months ago by  Tony Cannon.

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Monday Oct 15th, 2012 at 11:28 am #28439

Okay just to follow this up.

I have tried the custom fields within the s2member pro form and not my own customised registration template. It is still having same problems – it won’t ‘require’ any custom fields nor validate them either.

However, if I fill the form details in as they should be, it does add them to the user profile correctly on a successful registration.

Please some guidance would be much appreciated!-(

  • This reply was modified 4 years, 2 months ago by  Tony Cannon.
  • This reply was modified 4 years, 2 months ago by  Tony Cannon.
Posted: Tuesday Oct 16th, 2012 at 8:46 am #28517

Hi Tony.

I have tried the custom fields within the s2member pro form and not my own customised registration template. It is still having same problems – it won’t ‘require’ any custom fields nor validate them either.

The requirement and validation is done with JavaScript. If you’re positive that the field is required in your field’s settings, then it may be a JavaScript problem causing this behavior in your pro-form.

Could you post the URL to the page where the pro-form is? Or you can send it by email: s2Member® » Private Contact Form

There may be a JS conflict cause by the theme or another plugin. To test this quick, you can change the theme for a moment to the default one, refresh the page with the pro-form and try again. To test other plugins, deactivate them one by one and check after each if the problem continues.

I hope that helps. :)

Posted: Tuesday Oct 16th, 2012 at 9:51 am #28539

Hi Cristián,

Okay if this is the case then its connected to one of my other posts seen here.

I’ve sent a private message with url.

As you can see for both my css and js I get the following error:

“Fatal error: Call to undefined function bp_is_create_blog() in /homepages/21/d123415632/htdocs/corporate/addons/plugins/s2member/includes/classes/translations.inc.php on line 149”

I’m running s2member pro v120703 and current stable version of wordpress (3.4.2) as multisite, and buddypress (1.6.1) – so all up to date. S2member is only active for the primary site and not for any of the sub-blogs, and is not network activated. But I have tried all permetation of network activated and not with all plugins connected.

I have tried deactivating several plugins, deleting and reinstalling but with no joy. What do you think?

  • This reply was modified 4 years, 2 months ago by  Tony Cannon.
Posted: Tuesday Oct 16th, 2012 at 9:58 am #28542

Also if I’m logged in as super-admin then there are NO errors and css and js display correctly. So only appears that css and js error occurs when I am logged out?

Posted: Wednesday Oct 17th, 2012 at 7:46 am #28661

Hmm…

Are you getting this error in every blog of the network or just some? In the blogs where you get the error, is BuddyPress active?

When do you get the error? What page are you trying to load when you see that error? Is it when you try to load the s2Member URLs for the JS or CSS?

Posted: Wednesday Oct 17th, 2012 at 4:38 pm #28744

I haven’t set the s2member script to use for creating blog farms. So as it stands it is only activated for my site, the primary site (s2member has not been network activated). Buddypress is (and will only be) activated on the primary site.

I’m purely using it for permissions on my own plugin which will only allow paying members to access certain area and functions. At present my plugin is not installed as I want to lay the foundations down before adding anymore complexity.

What basically occurs with this problem is that whenever I am not logged in, the line in the head for s2member css appears like this, with no url parameters, and firebug shows the fatal error as in previous message:

<link id="ws-plugin--s2member-css" media="all" type="text/css" href="http://www.wheretopetersfield.co.uk/addons/plugins/s2member/s2member-o.php" rel="stylesheet">

And when I am logged in it appears as should be, with the url parameters, like so:

<link rel='stylesheet' id='ws-plugin--s2member-css'  href='http://www.wheretopetersfield.co.uk/addons/plugins/s2member/s2member-o.php?ws_plugin__s2member_css=1&#038;qcABC=1&#038;ver=120703-120703-109729511' type='text/css' media='all' />

This is also the same for the javascript header tag and occurs on all pages when I am not logged in.

Obviously all user registering aren’t going to be logged in so form falls down for css and js. My shortcode in the registering page is:

[s2Member-Pro-PayPal-Form level="1" template="s2member-pro/templates/forms/business-registration.php" ccaps="" desc="3 Months free / then $4.99 GBP / Monthly ( recurring charge, for ongoing access )" ps="paypal" lc="" cc="GBP" dg="0" ns="1" custom="www.wheretopetersfield.co.uk" ta="0" tp="3" tt="M" ra="4.99" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,maestro,solo" accept_via_paypal="paypal" coupon="SAVE-15" accept_coupons="1" default_country_code="" captcha="0" /]

Sorry for the headache!

  • This reply was modified 4 years, 2 months ago by  Tony Cannon.
  • This reply was modified 4 years, 2 months ago by  Tony Cannon.
Posted: Thursday Oct 18th, 2012 at 7:59 am #28820

What basically occurs with this problem is that whenever I am not logged in, the line in the head for s2member css appears like this, with no url parameters, and firebug shows the fatal error as in previous message:

Thanks, I understand now. I’m guessing it’s a plugin/theme causing it.

I have tried deactivating several plugins, deleting and reinstalling but with no joy. What do you think?

Could you try every plugin? Leave just BuddyPress and s2Member with the default theme. Start bringing the others back one by one and checking after each if the problem returns.

Posted: Friday Oct 19th, 2012 at 3:40 am #28969

Okay Cristián I’ve done as you said and the error appears to be caused by Better WP Security. Under Tweaks, go to and disable ‘Display random version number to all non-administrative users’.

I see this issue has been posted by other users in this forum, unfortunately I’ve been round the houses!-(

Many thanks for your help once again!

Posted: Friday Oct 19th, 2012 at 10:11 am #29015

I’m glad you found the problem! Thanks for the update. I’m glad I could help. :)

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