Home › Forums › Front-end Issues › Check for duplicate post based on custom date field › Reply To: Check for duplicate post based on custom date field
from what I can see it is because you are validating
$value against this
$$date_key.$coach_object and this is created by doing this.
$start_time = $_POST['acf']['field_58c2cb3c85ad0']; $date_key = strtotime($start_time); $coack_key = 'coach'; $coach_object = $_POST['acf']['field_59066c838afa6']; // this works
You must do the same thing in your validation filter and then query against this value and not
$value which is passed to your filter by ACF.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.