Easy Property Listings WordPress Real Estate Plugin › Forums › Priority Support › Gravity forms integration with epl data
Tagged: gravity forms
- This topic has 4 replies, 2 voices, and was last updated 9 years ago by Merv Barrett.
These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.
-
AuthorPosts
-
April 19, 2015 at 10:05 am #8718LauraSpectator
Hi Merv,
I’ve got buyer and seller contact forms built in gravity forms.
http://raindancedev11.com/contact-timeshare-hawaii/seller-contact-form/
http://raindancedev11.com/contact-timeshare-hawaii/buyer-contact-form/But I haven’t been able to successfully get it to load epl data into the custom fields. Can you tell me what I’m doing wrong?
I want to recreate their current page like this:
http://timeshare-hawaii.com/buy.html
In other words, rather than just static building names (location profiles) on my buy form page like I have now, I want it to dynamically load the actual current listings (properties) but so far, no dice.It’s form #3 in Gravity forms
http://raindancedev11.com/contact-timeshare-hawaii/buyer-contact-form-listings/
Clearly it’s built to do this but I can’t for the life of me figure out how to get it to show current listings as checkboxes…at all for that matter. I imagine it’s something relatively simple I’m missing…?One trick is I need to break them up under island headings. I want them to be dynamically updated like they are now on their current site
http://timeshare-hawaii.com/buy.htmlThanks if you can help.
April 19, 2015 at 10:12 am #8719LauraSpectatorI’ve also submitted a support request to Gravity. Not sure I knew enough to tell them what they need to know.
If what I want to display is current listings by island group…what is the parameter it needs to know or the “existing custom field name”? I was thinking it looks like property_address_suburb” and select “allow field to be populated dynamically” but that’s not getting me anything…
If you can tell me how to do it great, or, if you can tell me what I need to tell them so they can efficiently help I’d appreciate it.
Screenshots attached of what I did (clearly not working)
Thanks in advance as always.
Attachments:
You must be logged in to view attached files.April 20, 2015 at 4:57 am #8734LauraSpectatorHi Merv,
The Gravity Forms support team got back to me and said to use Example one from
http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/hooks/filters/gform_pre_render/#example-1Which is to use this code…but I’m not sure what to change to make it work for property listings.
To clarify, I want my form here
http://raindancedev11.com/contact-timeshare-hawaii/buyer-contact-form-listings/
to work like
http://timeshare-hawaii.com/buy.htmlSo it seems like I’d have to make 5 different drop downs, one for each island, and put the details from the shortcode below into the php code they show in the example…but not sure what to put where?
[listing post_type=”property” status=”current” location=”oahu” sort_order=”ASC”]
<?php
add_filter( ‘gform_pre_render’, ‘populate_dropdown’ );//Note: when changing drop down values, we also need to use the gform_pre_validation so that the new values are available when validating the field.
add_filter( ‘gform_pre_validation’, ‘populate_dropdown’ );//Note: when changing drop down values, we also need to use the gform_admin_pre_render so that the right values are displayed when editing the entry.
add_filter( ‘gform_admin_pre_render’, ‘populate_dropdown’ );//Note: this will allow for the labels to be used during the submission process in case values are enabled
add_filter( ‘gform_pre_submission_filter’, ‘populate_dropdown’ );
function populate_dropdown( $form ) {//only populating drop down for form id 5
if ( $form[‘id’] != 5 ) {
return $form;
}//Reading posts for “Business” category;
$posts = get_posts( ‘category=’ . get_cat_ID( ‘Business’ ) );//Creating drop down item array.
$items = array();//Adding initial blank value.
$items[] = array( ‘text’ => ”, ‘value’ => ” );//Adding post titles to the items array
foreach ( $posts as $post ) {
$items[] = array( ‘value’ => $post->post_title, ‘text’ => $post->post_title );
}//Adding items to field id 8. Replace 8 with your actual field id. You can get the field id by looking at the input name in the markup.
foreach ( $form[‘fields’] as &$field ) {
if ( $field->id == 8 ) {
$field->choices = $items;
}
}return $form;
}
?>April 20, 2015 at 5:00 am #8735LauraSpectatorThis reply has been marked as private.April 22, 2015 at 11:37 am #8946Merv BarrettKeymasterThis is above me and have never had much success passing values into Gravity Forms. Its advanced stuff and you would be better finding a developer on Elance to build this for you.
I’m not able to answer this as I really do not know and pass your above specifics to a project in Elance.
-
AuthorPosts
These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.
- The forum ‘Priority Support’ is closed to new topics and replies.