Sauter la navigation

[Résolu] call the Form validation function without Submit event

This support ticket is created Il y a 1 mois et 2 semaines. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 5 réponses, a 1 voix.

Dernière mise à jour par Minesh Il y a 1 mois et 1 semaine.

Assisté par: Minesh.

Auteur
Publications
#2803663

Hello,
I am trying to trigger the form validation function on an event without submitting the form. How can I run the validation when clicking on an element, for example?
on this site these is a form , i would like to perform the validation before Submitting the form, wenn ich go to the next step. I made span element to test it. When ich click the span "validation" the validation should starting.

best Regards
M Alwalid

#2803769

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you will have to use the custom Javascript code in order to trigger the click event of the submit button and that should validate the form.

Here is the related ticket that might help you:
- https://toolset.com/forums/topic/submit-is-not-a-function/#post-2239093

#2803802

hello Minesh,
Thank u,
when i click on submit button, it will perform the Validation von toolset automaticly. I just want to perform this validation when an element clicked, for. Example Next >> it schould not be abutton or submit, may be <a> or <span>, ich want to perfeorm the toolset validation bei clicking this element without Submit, i saw ur code, its for me complex to include all form inputs in such a code, i need the function wiche validate the hole form automaticly.

best regards
M Alwalid

#2803854

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

You can add your element click event call using custom JS and add the validation method to validate the form.

If you want more help for such custom requirement, you are always welcome to contact any of our certified partners:
- https://toolset.com/contractors/

#2803859

which validation method? is there any one for Toolsetforms?

#2803926

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

I mean the Toolset Forms hook "cred_form_validate":
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

But that runs on server side and you want to validate on frontend and for that you must use custom javascript jQuery.