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.

Importing custom field into email form?

  1. Hi folks.

    Fantastic plugin as always. And second to none support I have always found.

    I need help on working with custom fields in WP with Gravity Forms.

    I have a list of properties (custom post type - with custom fields) which are propogated on a page -

    Apartment 25 - 2 beds, 3 bathrooms - Enquire (link)
    Apartment 36 - 3 beds, 2 bathrooms - Enquire (link)

    The 'Enquire' link I would like, once clicked on to fire open a Gravity Forms pop up window, with the details of that apartment (ie; 25) populated, with a form, for the user to enquire about that specific apartment?

    The code I have at present is this -

    								        		$maro = new WP_Query(array('post_type' => 'properties', 'developments' => 'central-place'));
    								        		while ($maro->have_posts()) : $maro->the_post();
    								        		<h3><?php the_title(); ?></h3>
    								        		<p class="property-description"><?php echo get_post_meta($post->ID, 'property_description', true); ?></p>
    								        		<a href="<?php echo get_post_meta($post->ID, 'vendor_url', true); ?>" target="_blank">further details +</a>
    								        		<a href="">enquire +</a>
    								        		<hr />
    								        		<?php endwhile; wp_reset_query(); ?>


    Posted 9 years ago on Wednesday April 18, 2012 | Permalink
  2. David Peralty

    For the Gravity Forms pop-up link you'll have to create a custom template (pretty much blank in design) and then create a page with that custom template and put the gravity form in it. Then using some kind of AJAX pop-up solution that can work with HTML pages, you'll create a link to the form.

    In that link, you'll want to pass a value to help identify the location. From there, you'll want to make it so a field can be populated dynamically. It will then hopefully be populated based on the link.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  3. Thanks David,

    I kind of fixed it! It works, in as much as the pop up 'pops up'! So to speak. But it does not show the message, to say that your form was sent. The window just closes, with no confirmation message?

    You can see the dev site here

    You need to click on the 'enquire' link on the property. Any ideas?

    thanks in advance

    PS; One more small thing, is it possible, like you would do with any other link, right-click 'Open in new tab' on a modal with Gravity Forms inside? At present it just re-opens the same page?!

    And one last thing. Their is a weird situation with the property enquire forms, where when you click through the links in different orders, it seems to loop through the properties. So sometimes when you click on the 'enquire' link it does not always match the property you are enquiring about?!?

    Posted 9 years ago on Tuesday April 24, 2012 | Permalink