Support

Account

Home Forums Add-ons Repeater Field How to display radio button options? Reply To: How to display radio button options?

  • Thanks John, I modified it a bit so this is what it looks like now (works perfectly!):

    <?php if( have_rows('resources_column') ): ?>
                
                    <?php while( have_rows('resources_column') ): the_row(); 
                        // variables
                        $title = get_sub_field('resource_title');
    					$internal_link = get_sub_field('resource_internal_link');
    					$external_link = get_sub_field('resource_external_link');
                        $description = get_sub_field('resource_description');
    					$resource_link_type = get_sub_field('resource_link_type');
    					if ($resource_link_type == 'internal') {
    						$link = get_sub_field('resource_internal_link');
    					} else {
    						$target = ' target="_blank" rel="nofollow"';
    						$link = get_sub_field('resource_external_link');
    					}
    				?>
                    
    				<p class="resource-title"><a href="<?php echo $link; ?>"<?php echo $target; ?>><?php echo $title; ?></a></p>
                    <p class="resource-description"><?php echo $description; ?></p>
    
                    <?php endwhile; ?>
                
                <?php endif; ?>