Support

Account

Home Forums Add-ons Repeater Field Display repeater array values Reply To: Display repeater array values

  • James,
    I don’t understand what has to go in place of [‘value’] and [‘choices’] in this example:

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

    Should I leave them as-is?

    Thank you