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 metadata into iframe form on another site on multisite

  1. I need to pop-up a form across a dozen sites, so I'm doing it with and iframe as described here: http://www.gravityhelp.com/creating-a-modal-form-with-gravity-forms-and-fancybox/ (took way to long to find that after a dozen threads asking about shared multi-site forms).

    I need to dynamically populate fields with metadata from single custom post being currently being displayed when the form is popped open. I've used parameters before based on this: http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population to do that, but is that going to work with this iframe stuff?

    I don't want to setup all the iframe, modal, forms and then discover I can't get fields dynamically populated.

    So viewer is currently on site 43 viewing a post with post_id 123. I pop open a modal with an iframed form, that form is actually on site 1. Will that form get the parameters from that post_id 123 currently being viewed on site 43?

    Posted 7 years ago on Friday February 8, 2013 | Permalink
  2. Thoughts... can I do this by passing query string parameters into the iframe? Think I might have an answer to my own question (it'd be really great if some of this was in the documentation though -- the multisite and parameters into an iframe stuff)

    Posted 7 years ago on Friday February 8, 2013 | Permalink
  3. Almost there, but really need help on the last bit.

    I'm passing a couple parameters into the iframed form via a query string. I can successfully pass those values into a hidden fields on the form.

    My goal however is to pass them all in as merge tags in a paragraph text field's default value.
    My parameters are called: listing_name and listing_url.

    The default value for the paragraph text field looks like this:

    (I know 'param' isn't valid below, I'm using it as a placeholder because I can't find something that works):

    Dear {param:listing_name},
    Blah Blah Blah....
    Please visit {param:listing_url}
    Sincerely,
    {user:display_name}

    The user:display_name merge tag works fine in this scenario, but I can't figure out how use the parameters from the query string for the first two. The idea here is that the form pops up with those fields prefilled based on metadata on the page the form was popped on and then the user that popped open the form can fill in the "blah blah blah" part.

    I'm passing the listing_name and listing_url paramaters into hidden fields fine, but how do I access them via a merge tag like this? Is there a way to dynamically populate into a merge tag like that?

    I tried using the hidden fields as one would upon form submission
    {listing_name:7}
    {listing_url:8}

    but that did nothing...

    Just to be clear I need this populated into the default value for the form, not after the form is submitted.

    Posted 7 years ago on Friday February 8, 2013 | Permalink
  4. Doh... doing it wrong... figured it out (don't populate the paragraph text field that way, just build the message in the notification section like normal. The ability of user:display_name to function there thew me. This is all working great now... I love gravity forms :)

    Posted 7 years ago on Friday February 8, 2013 | Permalink
  5. Glad you were able to talk your way through that one. Thanks for sharing your thought process.

    Posted 7 years ago on Saturday February 9, 2013 | Permalink

This topic has been resolved and has been closed to new replies.