Support

Account

Home Forums General Issues DatePicker returns object if no date set Reply To: DatePicker returns object if no date set

  • Hi @davemccourt

    Hm. Any ACF field where no one has added any values (manually or programmatically) should just return false since they don’t even exist in the DB yet. Are you sure you haven’t got any code creating an empty value or maybe you’ve added and then deleted the date?

    As for your check maybe something like this works? I assume you’re in a function that would send out an email if it keeps going.

    
    <?php
    if( !isset(get_field('field_557ff26b07d38', 'user_' . $instructor->ID)) ){
    	return false;
    ?>