• Hi

    I have been using this plugin from the last year. Integrated lots of custom fields in many websites which are all working fine. Just got a small issue.

    I have created a select drop down nested inside a loop for repeating items. But when I am trying to call it in PHP it doesn’t display any values. Instead I created another select field separately and it works but only outside the loop.

    This is the code I am using to display values:

    
    <?php
    $fields = CFS()->get( 'add_testimonials' );
    foreach ( $fields as $field ){?>
    <div>
    <div class="col-md-12">
    <div class="testimonial"><p><?php echo $field['testimonial_here']; ?></p></div>
    <div class="ratings">
    <ul>
    <?php $values = CFS()->get( 'testimonials_ratings' ); 
    foreach ( $values as $key => $label ) 
    {
    	echo '<li class="'.$label.'"></li>'; 
    } 
    ?>
    </ul>
    </div>
    <div class="author"><strong><?php echo $field['author_name']; ?></strong><br><?php echo $field['author_location']; ?></div>
    </div> 
    </div>  
    <?php } ?>
    

    And the fields I have created are – http://myvcart.com/CFS-select.jpg

    There are 8 same pages but client need different testimonials on each page. Everything works fine. I just want to display the rating stars for each. If you see this page – https://www.5thstreetgroup.com/brands/rich-casino it shows rating stars but its not from that loop. It works like one for all 4 when created separately.

    Any help would be appreciated.
    Thanks!

    The page I need help with: [log in to see the link]

The topic ‘Select dropdown not working when nested inside a loop for repeated items’ is closed to new replies.