Support

Account

Home Forums ACF PRO acf/validate_save_post on clone fields Reply To: acf/validate_save_post on clone fields

  • Here is how I would work around this issue with the star field as an example. This will work for both cloned and non-cloned versions of the same field.

    
    $field_key = 'field_5d49b2ff396b6';
    foreach ($_POST['acf'] as $key => $value) {
      if (substr($key, -strlen($field_key)) === $field_key) {
        $start = new DateTime($value);
        break;
      }
    }
    

    If I was going to do this a lot then I’d probably build a function that searches the input to find the right value.