Support

Account

Home Forums General Issues Checkbox value conditional statement error Reply To: Checkbox value conditional statement error

  • DOH! This is a repeater field, and this works:

    `<?php
    if(have_rows(‘project_areas’)):
    while(have_rows(‘project_areas’)): the_row();
    ?>

    <table>
    <tr>
    <td>Crash</td>
    <td class=”align-center”>
    <?php
    if( get_sub_field(‘proj_crash’) ) {
    if( in_array( ‘Timeliness’, get_sub_field(‘proj_crash’) ) )
    {
    echo ‘X’;
    }}
    ?>
    </td>
    </tr>
    </table>
    <?php endwhile;
    endif;
    ?>’