• Hi, just downloaded, haven’t upgraded to pro yet. I am creating a restaurant review website on wordpress. The users use a front end form to create their review posts, they need to fill in a couple of details like restaurant name, location, cuisine, pricing, food quality, ambience etc. For the value of ‘Location’ field on the form, I want the users of my website to locate the restaurants they visited using ‘leaflet marker’.
    I have activated the plugin and created the first marker already, please guide me how to embed the ‘leaflet marker’ into a front end form.
    Also, from the plugin I want to display only ‘Marker name’ and ‘Location’ fields along with the map and marker. Rest all the fields should have admin defined values and should remain hidden from the other website users.
    How to enable the above?
    TIA

    https://ww.wp.xz.cn/plugins/leaflet-maps-marker/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    thanks a lot for your interest in Leaflet Maps Marker respectively Maps Marker Pro!
    For adding a new map from a form you need to connect to the MapsMarker API with a custom GET request for example. How that has to be done depends on the form plugin used – anyway you will find example of API requests at the docs page at https://mapsmarker.com/mapsmarker-api – please be aware that with the free version you can only add new markers via the API – if you want to update and delete markers via the API too, you need to update to pro.
    regarding your need to only display “Marker name” and “location”: if you mean the information which should be displayed below the map in the so-called “list of markers”: you can set via Settings / map defaults / “list of markers settings” which fields should be visible in that list. Anyway please be aware that via the GeoJSON API all marker data can be retrieved as there are no mechanism for hiding that info (as it is needed to build the map).
    best,
    Robert

    Thread Starter websiter123

    (@websiter123)

    Hi, Thanks a lot for the quick response. The example page has a lot of content and that made things more confusing for my understanding.
    Could you please point out to a specific example of the code of a front end form where leaflet marker is being used?
    Do you have a shortcode for this?

    you would need to make a similar api call when submitting your form:

    Add new marker, title Headquarter, geocode Main Street 1 Washington:
    http://your-domain/wp-content/plugins/leaflet-maps-marker-pro/leaflet-api.php?key=YOUR_PUBLIC_KEY&signature=YOUR_SIGNATURE&expires=YOUR_EXPIRE_VALUE&action=add&type=marker&markername=Headquarter&geocode=Main Street 1 Washington

    anyway using the Mapsmarker API requires some coding, so I’d suggest talking to your theme developer for example to do that for you.

    Shortcode for frontend submissions is not yet available, but planned for a later release…
    best,
    Robert

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘For front end users submission’ is closed to new replies.