PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Dynamically populate upload fields

  1. Hello,
    I use Gravity Forms with the User Registration Add-On. I created a form to register a user and have added functionality to read the registered user-information to dynamically fill the form, if a user is logged in and wants to modify his registered information. So far so good. But the user can also upload a photograph. The upload-fields don't have the option to dynamically populate the field, which I can understand. But now I want to show the photograph in the form, if a user has uploaded the photograph. So he can choose to upload another, or leave the already uploaded photograph. Can someone give me a direction how to do that?

    Posted 12 years ago on Wednesday June 20, 2012 | Permalink
  2. I had to do this as well. My solutions (admittedly not ideal) was to leave a gap in the form and after the GF shortcode, floating a div that contained the profile picture up into the gap:

    <?php echo do_shortcode('[gravityform id=X name="X"]'); ?>
    <div class="edit-image">
    <?php echo get_the_post_thumbnail($editID, 'thumbnail'); ?>
    </div>

    ...Where the class edit-image has a negative top-margin value.

    Posted 12 years ago on Friday June 22, 2012 | Permalink
  3. Thank you! This was the direction I was thinking too. I hoped there would be a more "integrated" solution, but I will move with this one! Thanks again!

    Posted 12 years ago on Wednesday July 4, 2012 | Permalink