Skip Navigation

[Resolved] block urls in form fields

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)

This topic contains 4 replies, has 2 voices.

Last updated by garenM 2 years ago.

Assisted by: Minesh.

Author
Posts
#2492853

hey How can I Block URLs Inside the Form Fields?

#2492871

Minesh
Supporter

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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!