Support

Account

Home Forums General Issues Time Picker

Solved

Time Picker

  • Looking for some help here.

    I’m using the time picker in a repeater and the field is NOT required.
    When pulling the data I need to check whether or not the time picker value is empty.

    I’ve tried the following statements but non are true:

    if ( empty($sub_field_start_time_value) ) { //do this if empty } else {//do this if NOT empty}
    if ( $sub_field_start_time_value == NULL )
    if ( $sub_field_start_time_value == “” )
    if ( $sub_field_start_time_value == 0 )
    if ( $sub_field_start_time_value == “0” )

    This is the code i’m using to get my data:

    $rows = get_field(‘oh_days’, ‘option’); // get all the rows
    $specific_row = $rows[$currentDayOfWeek]; // 0 will get the first row
    $sub_field_start_time_value = $specific_row[‘oh_start’]; // get the sub field value
    $sub_field_end_time_value = $specific_row[‘oh_end’]; // get the sub field value

    Any help would be appreciated.

  • Solved my issue. I had a line a code that was overriding my if.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Time Picker’ is closed to new replies.