Skip Navigation

[Resolved] CRED form field validation with field not in form

This support ticket is created 7 years, 11 months ago. 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.

Our next available supporter will start replying to tickets in about 2.02 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Author
Posts
#395353

I have a post type with a "token" text field.
I want users to be able to edit this post type - but only if they type the correct token value.

In at CRED post edit form i have added a generic field "write_token" that is validated against the "token" field.

This only works when the "token" field is printet in the form. How can I validate my "write_token" form field against "token" field without exposing the "token" field in the form?

#395575

Dear jonas,

There is a built-in SPAM Protection feature within CRED form:
See our document:
https://toolset.com/documentation/user-guides/creating-cred-forms/
section "Built-in SPAM Protection for Forms"

If you still need the custom "token" text field, it needs some custom codes, I suggest you try with the CRED filter hook:
cred_form_validate
https://toolset.com/documentation/user-guides/cred-api/#cfv

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.