Support

Account

Home Forums Add-ons Repeater Field PDF Attachment as Link Reply To: PDF Attachment as Link

  • Hi @hartu

    Could you please tell me where did you want it to show up?

    If it’s on the front end, I believe you can add a new file custom field to the repeater and then add the link to the job text like this:

    <?php 
    
    // check if the repeater field has rows of data
    if( have_rows('repeater_field_name') ):
    
     	// loop through the rows of data
        while ( have_rows('repeater_field_name') ) : the_row();
    
            // display a sub field value
            $file = get_sub_field('file_sub_field');
            if( $file ):
            ?>
            
            <a href="<?php echo $file['url']; ?>"><?php the_sub_field('job_sub_field'); ?></a>
            
            <?php endif;
    
        endwhile;
    
    else :
    
        // no rows found
    
    endif;
    
    ?>

    I’m afraid you can’t do it on the backend, though. I’m sorry for the inconvenience.

    I hope this helps 🙂