Support

Account

Home Forums Front-end Issues Checkboxes and icons

Unread

Checkboxes and icons

  • I’m trying to show icons to represent wash care symbols for checkbox fields in ACF.

    I have the following code, which only outputs the bullet points and no labels:

    // Load field settings and values.
    $field = get_field_object(‘careguide’);
    $careguide = $field[‘value’];

    // Display labels.
    if( $careguide ): ?>

      <?php foreach( $careguide as $care ): ?>

    • <?php echo $field[‘choices’][ $care ]; ?>
    • <?php endforeach; ?>

    <?php endif; ?>

    I would like to show a wash care symbol (image) in place of the selected options, but I seem to be going around in circles.

    Any help would be appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.