Problem: I have a Form that creates new posts in a custom post type. One of the custom fields holds a telephone number. I would like to prevent the Use from creating a post if the telephone number they submit already exists in the database as a telephone number for another post.
Solution: Use the Forms API hook cred_form_validate to inspect the submitted custom field value. Create a custom post query that also queries posts by that custom field value. If any posts are found in that query, display an error message on the telephone field.
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.
|8:00 – 12:00||8:00 – 12:00||8:00 – 12:00||8:00 – 12:00||8:00 – 12:00||-||-|
|13:00 – 17:00||13:00 – 17:00||13:00 – 17:00||13:00 – 17:00||13:00 – 17:00||-||-|
Supporter timezone: America/New_York (GMT-04:00)