Support

Account

Home Forums Backend Issues (wp-admin) Dynamic population using shortcode ACF+Gravity Forms Reply To: Dynamic population using shortcode ACF+Gravity Forms

  • In my case I wanted the form repeated for each organization (ultimately would appear in a pop-up) with the respective organization’s email populating a hidden “Send To” field.

    <?php if( have_rows(‘add_contact’) ): ?>

      <?php while( have_rows(‘add_contact’) ): the_row();?>

    • <?php the_sub_field(‘organization_name’); ?>
      <?php $email = get_sub_field(‘send_to_email’);?>
      <?php echo do_shortcode(‘[gravityforms id=1 title=false description=false field_values=get_email=’.$email.’]’); ?>
    • <?php endwhile; ?>

    <?php endif; ?>