Single Submission Map Shortcode
Introduction
The [nfgeo_single_entry_map] shortcode displays one saved Geocoder location from one Ninja Forms submission. Use it on confirmation pages, account pages, internal records, or other content where one submitted location should appear on a map.
Available in: Pro and Agency.
The map requires Maps JavaScript API on the Browser API Key and a submission containing a valid saved Geocoder location.
Important: the shortcode does not infer a current submission. Every use must supply an explicit saved submission_id. When that value is not known in advance, insert it through the page or confirmation workflow's supported dynamic-content mechanism.
Setting Up and Using the Single Submission Map
Use an internal submission post ID
[nfgeo_single_entry_map submission_id="1234"]Without form_id, submission_id is treated only as the internal WordPress nf_sub post ID.
Use a Ninja Forms submission sequence number
[nfgeo_single_entry_map form_id="7" submission_id="25"]With form_id, the shortcode first looks for sequence number 25 in form 7. If it is not found, it checks whether 25 is an internal submission post ID belonging to form 7.
Select a specific Geocoder Field
[nfgeo_single_entry_map form_id="7" submission_id="25" geocoder_key="office_location"]geocoder_key is the public field key configured in Ninja Forms. When omitted, the shortcode uses the first Geocoder Field in the form that contains valid saved coordinates for the submission.
Customize the map
[nfgeo_single_entry_map form_id="7" submission_id="25" map_height="500px" map_width="100%" map_type="ROADMAP" zoom_level="14" info_window_fields="formatted_address"]Submission Reference Behavior
submission_idis always required; there is no automatic current-submission fallback.- Use both
form_idand the sequence number shown in Ninja Forms for the clearest configuration. - With
form_id, the shortcode tries a sequence number first, then an internal post ID constrained to that form. - Without
form_id, only an internalnf_subpost ID can be resolved. - The resolved submission must contain valid latitude and longitude in the selected Geocoder Field.
Shortcode Attributes
| Attribute | Default | Description |
|---|---|---|
submission_id | 0 | Required submission reference. |
form_id | 0 | Optional form context; recommended when using a Ninja Forms sequence number. |
geocoder_key | Empty | Public key of the Geocoder Field to display. |
info_window_fields | formatted_address | Comma-separated field keys or location values shown in the marker information window. |
meta_fields | formatted_address | Comma-separated field keys or location values displayed below the single-location map. |
show_map_link | true | Shows a link to open the location in Google Maps. |
element_id | Auto-generated | Optional unique map element ID. |
map_height | 400px | Map component height, including a valid CSS unit. |
map_width | 100% | Map component width, including a valid CSS unit. |
map_type | ROADMAP | Initial map type: ROADMAP, SATELLITE, HYBRID, or TERRAIN. |
zoom_level | 12 | Initial map zoom. |
gesture_handling | auto | Google Maps gesture behavior, such as auto, cooperative, greedy, or none. |
marker_clusterer | true | Shared map option. It has no visible effect when only one marker is rendered. |
max_locations | 200 | Shared map limit. This shortcode returns at most one location. |
location_marker_url | Empty | Optional marker icon URL. |
Saved Value and Output
The shortcode does not save or modify submission data. It reads the selected saved Geocoder value and renders one marker, its information window, optional metadata, and the optional Google Maps link.
Privacy
A shortcode can expose a saved submission location and selected fields to anyone who can view the page. Do not place private customer, employee, or personal-address data on an unrestricted public page. Apply appropriate WordPress access controls and display only the metadata viewers need.
Troubleshooting
No map appears
Confirm that the installed package is Pro or Agency, that submission_id resolves under the rules above, and that the submission contains a valid saved Geocoder value. Also verify Maps JavaScript API and the Browser API Key's HTTP-referrer restrictions.
A sequence number does not resolve
Add the matching form_id. Without form context, submission_id is interpreted only as an internal nf_sub post ID.
The wrong Geocoder Field is displayed
Add geocoder_key using the public field key shown in the Ninja Forms builder. Without it, the first Geocoder Field with valid saved coordinates is used.
Metadata or information-window content is empty
Use exact field keys in meta_fields or info_window_fields and confirm that the submission saved values for those fields. formatted_address is supplied from the Geocoder location.