Tagged: gravity forms
- June 13, 2016 at 5:29 AM #41583
Are there any hooks or query strings I can use to pass the output from a search (ie all the results within that radius) in to a gravity forms field?
The gravity forms has the option for html output from a hook and I have this working with other plugins. Is it possible with the store locator?
ThanksJune 18, 2016 at 1:02 PM #41689
That’s an interesting option.
Can you elaborate something more on how you did it with the other plugins you’re talking about?
I might get some better idea on where to look for the solution.
JanJune 18, 2016 at 1:09 PM #41690
In gravity forms you can use the hidden field and use the “Allow field to be populated dynamically option.
You then enter the hook or query and this populates that fieldJune 18, 2016 at 1:15 PM #41692
Ok, I see.
I would suppose that you could use the results short code like “[slp_location <city>]” (see https://docs.storelocatorplus.com/blog/results-layout-shortcodes-and-attributes/).
However, how do you pass parameters like “<city>” to the shortcode?
Or how would the search query know what to search for?
JanJune 18, 2016 at 3:21 PM #41696
Good question.. The old store locator and the gravity form was on the same page.The gravity form has an HTML section where the output was passed too. I believe the results where passed to an array which could be called via the nearest_stores hook.
Alternatively I have been trying to embed the shortcode for this plugin in the HTML of the gravity forms however this is not displaying the map at all or showing results.
Can you think of a better way to do this?June 22, 2016 at 4:01 PM #41749
I could imagine you can have a JS which is triggered as soon as the user selects a location. The JS then copies the information to the corresponding fields of you GForm.
Would take some coding and I’m not sure it will work…
JanJune 26, 2016 at 4:33 PM #41788
are you planning on a new site with Store Locator Plus so the site link you provided is it a staging site?
The Home page : https://www.postpullers.co.uk/hire/ shows that you have another Locator plugin installed. When you say the old store locator and gravity forms worked on the same page are you referring to store_locator_ word press? (That is a different plugin) not ours) I see on the home page link /hire tab the store_ locator _wordpress plugin is installed and not Store Locator plus , yet on your test page example link you provided above it has SLP. Just wanted to clarify because I saw a console error about sensor not required which indicated you are using another Locator plugin (SLP does not give you that error warning) so I checked the WP sources.
Having multiple Locator (conflicting) plugins can break the SLP map and geocoding so I do not know what it will do as far as conflicts with any of the add-ons. So it is possible there are other issues with your site and they are not relative to Gravity forms. I do not see where you have provided your Plugin environment. We always need that information (see Posting Guidelines) in order to provide you with answers that are pertinent to your particular issues.
The topic ‘Pass search output to gravity form?’ is closed to new replies.