Support

Account

Home Forums Add-ons Repeater Field Get only the matching subfield value within the repeater element inside a code b Reply To: Get only the matching subfield value within the repeater element inside a code b

  • Only if you can pass that value to the PHP code. I don’t know anything about the builder you’re using so I can’t answer that.

    Normally in php I would do something like this to only show a specific row.

    
    <?php if( have_rows('veranstaltung_treffpunkt') ): ?>
    
        <?php while( have_rows('veranstaltung_treffpunkt') ): the_row(); ?>
    
            <?php 
    
    if (get_sub_field('some-field') == $passed_value)) {
            // vars
            $value = get_sub_field('what3words');
            $str2 = ltrim($value, '/');
    }
            ?>
    
    <a>">/// <?php echo $str2; ?></a>
    
        <?php endwhile; reset_rows(); ?>
    
    <?php endif; ?>