Sauter la navigation

[Résolu] block urls in form fields

This support ticket is created Il y a 2 années et 5 mois. 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 4 réponses, a 2 voix.

Dernière mise à jour par garenM Il y a 2 années et 5 mois.

Assisté par: Minesh.

Auteur
Publications
#2492853

hey How can I Block URLs Inside the Form Fields?

#2492871

Minesh
Supporter

Les langues: Anglais (English )

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

Hello. Thank you for contacting the Toolset support.

Do you mean that you want to remove URLs added to WYSIWYG field?

Can you please explain your case and with what form fields you do not want or how you want to block the URLs?

In addition to that - I would like to have debug information that will help us to know your current setup.
- https://toolset.com/faq/provide-debug-information-faster-support/

#2493355

Hey what I mean is on the message field on the form when the user includes a url on the message I want to show him an error message instead to submit the form

#2493393

Minesh
Supporter

Les langues: Anglais (English )

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

You can use the Toolset Form's hook "cred_form_validate" to validate any of your field.
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Following link may help you to check if content has URL or not and you can use the above hook to validate the message field:
- https://stackoverflow.com/questions/19463929/check-if-text-contains-url

#2493423

My issue is resolved now. Thank you!