Not allow to create CPT if custom field already exists.
Started by: jesusM-6
in: Toolset Professional Support
Quick solution available
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.
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
3
7
4 years, 11 months ago
jesusM-6
How to create an dynamic auction custom post?
Started by: sinisaB
in: Toolset Professional Support
2
7
4 years, 11 months ago
sinisaB
Sum of custom field of intermediary posts in nested view
Started by: attilaT
in: Toolset Professional Support
2
5
4 years, 11 months ago
attilaT
Using toolset Maps – how do I display the zip/postal code on the front end
Started by: larryB-3
in: Toolset Professional Support
2
3
4 years, 11 months ago
larryB-3
Webm is not validated as a video in Toolset Types Video field
Started by: AngelaE
in: Toolset Professional Support
2
5
4 years, 11 months ago
Christian Cox
Back End fields aren't abiding by the set conditions …
Started by: gordonW-2
in: Toolset Professional Support
2
12
4 years, 11 months ago
gordonW-2
Confirm setup of template, post form, and custom fields
Started by: Charles
in: Toolset Professional Support
2
8
4 years, 12 months ago
Christian Cox
Conflict GiveWP causes customfields to disappear for custom user role backend
Started by: glenn
in: Toolset Professional Support
2
11
5 years ago
glenn
Something is snowflakish about CRED DatePicker
Started by: smileBeda
in: Toolset Professional Support
2
2
5 years, 1 month ago
Waqar
Date filters not working correctly
Started by: nickH-5
in: Toolset Professional Support
2
4
5 years, 2 months ago
Christian Cox
Social Share Block not working correctly
Started by: michaelR-26
in: Toolset Professional Support
4
15
5 years, 2 months ago
asaG
Any reason why HTML comments are removed in CRED Forms?
Started by: smileBeda
in: Toolset Professional Support
2
5
5 years, 3 months ago
Waqar
Allow negative number of distance radius on toolset views distance filter
Started by: benC-15
in: Toolset Professional Support
2
7
5 years, 3 months ago
Waqar
Split: Custom search tab not showing in Elementor
Started by: Brijesh
in: Toolset Professional Support
2
2
5 years, 5 months ago
Waqar
Relationship Custom Field Showing Custom Field Content Instead of Display Text
Started by: joshM-4
in: Toolset Professional Support
2
2
5 years, 7 months ago
Luo Yang