Store Locator Plus for WordPress Forums Third Party Add-ons by Debaat Pass search output to gravity form?

Tagged: 

This topic contains 6 replies, has 3 voices, and was last updated by  Cici 2 years, 1 month ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41583

    JT
    Participant

    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?

    Thanks

    #41689

    DeBAAT
    Moderator

    Hai JT,

    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.

    Gr.
    Jan

    #41690

    JT
    Participant

    Hi DeBAAT

    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 field

    http://imgur.com/zZr6kYG

     

     

    #41692

    DeBAAT
    Moderator

    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?

    Jan

    #41696

    JT
    Participant

    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?

    https://www.postpullers.co.uk/test-page/ example

    #41749

    DeBAAT
    Moderator

    Hai JT,
    Did you consider a JavaScript solution?
    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…
    Gr.
    Jan

    #41788

    Cici
    Keymaster

    Hi Jt,

    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.

    The google error from having other store locator plugin : (a=_.Sk(c),window.console.warn(“Google Maps API warning: “+c+” https://developers.google.com/maps/documentation/javascript/error-messages#“+a))}

    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.

     

    Info from the developers  news  blog about Javascript errors due to changes in WP can be causing your Map to not appear (besides having two locator plugins)  Also review the information in Troubleshooting

     

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Pass search output to gravity form?’ is closed to new replies.