Support

Account

Home Forums Add-ons Repeater Field Display repeater from options page Reply To: Display repeater from options page

  • Oh, sorry if I was not answer completely. I just understand now. (I need more practice in english hehe)

    Ok, you can play with your PHP like that, but know, you have in fact, multiple ways:

    (I supose you have your date in the format you give me. Let’s me know if it’s a timestamp.)

    
    <?php
    
        if(have_rows("gesloten", "option")){
            
            echo '<table style="width: 100%;">';
            
                echo '<tbody>';
            
                while(have_rows("gesloten", "option")) : the_row();
    
                    $birthDayName = get_sub_field("feestdag");
    
                    $startDate = get_sub_field("datum");
                    $endDate = !empty(get_sub_field("eind-datum")) ? ' - ' . get_sub_field("eind-datum") : null;
                    
                    $startToEndDate = $startDate . $endDate;
    
                    echo '<tr>';
                        echo '<td>'. $birthDayName .'</td>';
                        echo '<td>'. $startToEndDate .'</td>';
                    echo '</tr>';
    
                endwhile;
            
                echo '</tbody>';
            
            echo '</table>';
        }
    
    ?>