If you use forms on your WordPress site, you will probably use a plugin to generate them. In most cases, the form plugin will provide you a shortcode that will somehow look like this:
[form-xyz id="1"]. You can then use this shortcode to place the form somewhere on your pages or posts.
You can help the user to fill out the form by providing an interactive map. You can place this map either below or above your form. You will then end up with two shortcodes on your site:
We assume that our select field has the following HTML:
<select id="location"> ... <option value="newyork">New York</option> ... </select>
There are two critical parts in this code that have to be changed on your site:
- In this example we used the selector
#locationwhich is basically the id of our select field. The selector depends on the form and the plugin that you use. You will have to look at the HTML of your form to identify the correct field.
- The plugin allows to store additional information for each marker in the
click_valuevariable. In this example we use the
click_valueto store the option value of the corresponding select entry.
Therefore, for New York we will store “newyork” in the click value. This will then set the select field to “New York” whenever the user clicks on New York.
If you have problems to find the right selector or option values contact us and send us the url of a page that contains the corresponding form. We will then send you the right selector for your form.
The map configuration can be found here: