Support

Account

Home Forums Front-end Issues Checkbox output is displaying ALL only Reply To: Checkbox output is displaying ALL only

  • Here is the fix if anyone is interested. This will output the selected checkbox items as a list.

    <?php
    
    // vars	
    $field = get_field_object('family_amenties');
    $values = $field['value'];
    
    // check
    if( $values ): ?>
    <ul>
    	<?php foreach( $values as $value ): ?>
    		<li><?php echo $field['choices'][ $value ]; ?></li>
    	<?php endforeach; ?>
    </ul>
    <?php endif; ?>