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.

aria-required does not work

Home Forums Community Forum aria-required does not work

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

Topic Author Topic
Posted: Tuesday May 14th, 2013 at 5:42 pm #49973

I’ve created a custom registration form as described here: http://www.s2member.com/kb/pro-forms/#customizing-pro-forms with custom fields as described here: http://www.s2member.com/kb/pro-forms/#custom-data-w-pro-forms.

Everything works, except for the javascript validation. Should it be enough to add ‘aria-required=”true”‘ to trigger the javascript validation, or does this need more html structure around the input fields as is in the paypal-registration-form.php?

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Wednesday May 15th, 2013 at 1:36 am #50002

The validation mentioned in the tutorial would be to make sure the required fields aren’t empty, but the JS won’t validate the input.

To check that the input is correct (e.g. format), you’d have to customize the hack part in step 3 a bit. http://www.s2member.com/kb/pro-forms/#custom-data-w-pro-forms

This post by Jason may help too: http://www.s2member.com/forums/topic/registering-without-required-fields/#post-10707

Posted: Wednesday May 15th, 2013 at 11:47 am #50021

Thanks for your answer.

That was what I meant with JavaScript validation ;-) It doesn’t check whether the fields are empty or not. Doesn’t matter if I use aria-required=”true” or not, I can submit the registration form with empty fields.

Posted: Thursday May 23rd, 2013 at 9:29 pm #50514

Ah, got ya. Does that same validation work for other fields that weren’t customized? Or does it work with the pro-form with the default template?

You can try these too: Knowledge Base » Common Troubleshooting Tips

Could you please send your site’ sinfo? I’d like to take a look at the page with the pro-form using the custom template. Please include the page where you have the pro-form, and leave a reply here after you send it. Thanks! s2Member® » Private Contact Form

Posted: Friday May 24th, 2013 at 6:26 pm #50571

I’ve ‘fixed’ this by using the exact same html-structure around the input fields as the default template. I don’t have the other version online any more, so I can’t send you the link. But for now it has been fixed, maybe in another project I will investigate this further.

Posted: Friday May 24th, 2013 at 11:40 pm #50608

Oh, that’s great! I’m glad you fixed it.

I’ll ask Jason if there’s any requirement for the validation to work, based on what you found. Thanks!

Posted: Sunday May 26th, 2013 at 11:29 pm #50690

Jason explained to me what is required for the JS validation to work, and I added it to the article right after the example code here: http://www.s2member.com/kb/pro-forms/#custom-data-w-pro-forms

I hope that clarifies it.

Posted: Tuesday May 28th, 2013 at 12:19 pm #50750

Thanks!

Posted: Wednesday May 29th, 2013 at 4:23 am #50800

No problem. :)

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