Add Place Form Embed
The add place form lets visitors suggest a business or place for your directory. Before it submits, it checks Vibemap for the same place and offers to update that listing instead. Put it on a "Suggest a business" page beside your directory or map embed.
Embed code
<div id="vibemap-add-place"></div>
<script
src="https://web.vibemap.com/load.js"
data-iframe-el="vibemap-add-place"
data-resize="true"
data-url="https://web.vibemap.com/embed/add-place?accentColor=1d6fa5"
></script>
Add theme=<your-theme-slug> to use your theme's accent color, intro message, required fields and auto-tags.
Parameters
Booleans take true or false, or 1 or 0. Colors take hex with or without #. URL-encode values that contain spaces, & or #.
Appearance
| Parameter | Type | Default | Description |
|---|---|---|---|
theme or themeName | string | - | Theme slug. Sets the accent and header colors, intro message, required fields and auto-tags, and tags each submission with the theme. URL parameters still win. |
accentColor | color | theme accent, else #7209B7 | Buttons and section underlines. |
headerColor | color | theme accent, else #7209B7 | Background of the quick-import header. |
headerTextColor | color | #ffffff | Text color in the quick-import header. |
showAISearch | boolean | true | Show the quick-import header, where a visitor searches for a business or pastes its website to fill in the form. |
quickImportTitle | string | Quick Import | Quick-import header title. |
quickImportDescription | string | Search for a business or paste a website URL to auto-fill the details | Quick-import header text. |
maxWidth | string | lg | Form width: xs, sm, md, lg or xl. |
submitButtonPosition | string | bottom | fixed makes the submit bar sticky. It helps only in a fixed-height frame that scrolls. |
instructions | string | theme intro message | Text or HTML shown under Place Info. HTML keeps p, br, strong, em, b, i, u, span, ul, ol, li, h3 to h6 and http, https or mailto links; other tags are dropped and their text kept. |
inDialog | boolean | false | true drops the form's full-window minimum height, for a form shown in a dialog. |
customCSS | string | - | CSS added to the form page. Target .add-place-form-root, .add-place-form-header, .add-place-form and .add-place-form-instructions. @import, url() and image-set() are removed, so the CSS can't load files. |
Fields and validation
| Parameter | Type | Default | Description |
|---|---|---|---|
requiredFields | list | theme's required fields | Fields a visitor must fill in, on top of the name and location the form always requires: description, website, telephone (or phone), instagram, facebook, twitter, tags, vibes, categories or images. Other names are ignored. Auto-tags don't count toward a required tags. |
Submissions
| Parameter | Type | Default | Description |
|---|---|---|---|
autoTags | string | - | Tags added to every submission, separated by | (for example local|retail). A theme with its own place-form auto-tags replaces these. |
customer | string | - | Customer identifier sent with each submission. |
list | string | - | List slug. Each new place is added to that list and gets its auto-tags, when the list accepts place submissions; otherwise the place is submitted without it. A place already on Vibemap becomes a suggested edit and is not added. |
submitMode | string | submit | log fires the submit events without saving anything. Use it to test your page. |
lat | number | - | Latitude that place suggestions and the duplicate check favor. Needs lng. |
lng | number | - | Longitude that place suggestions and the duplicate check favor. Needs lat. |
Prefill
| Parameter | Type | Default | Description |
|---|---|---|---|
initialName | string | - | Business name. |
initialDescription | string | - | Description. |
initialUrl | string | - | Website. |
initialAddress | string | - | Street address. |
initialTags | list | - | Tag slugs. |
initialVibes | list | - | Vibe slugs. |
initialCategories | list | - | Category slugs. |
Edit-business links
The same page opens in edit mode from a link Vibemap generates for one business. The business owner opens that link directly; there is nothing to embed. The access token lets anyone holding the link propose changes to that listing, so send it only to that business.
| Parameter | Type | Default | Description |
|---|---|---|---|
place | string | - | Slug of the business to edit. Set by the link. |
t or token | string | - | Access token. Set by the link; don't edit it. |
Events and sizing
The form reports its height like every embed; see Embedding and sizing.
It also tells your page about submissions:
| Message | Payload | Sent when |
|---|---|---|
place-form-submitted | { embedId: "add-place", data }: the saved place, or with submitMode=log the place that would have been sent | A submission succeeds |
place-form-message | { embedId: "add-place", message, isSuccess } | The form shows a status or error message |
The loader also fires them as DOM events on your container element, with or without data-resize. vibemap:place-submitted carries the place in e.detail; vibemap:form-message carries { message, isSuccess, embedId }:
<script>
const container = document.getElementById("vibemap-add-place");
container.addEventListener("vibemap:place-submitted", (e) => {
console.log("Submitted:", e.detail);
});
container.addEventListener("vibemap:form-message", (e) => {
console.log(e.detail.message, e.detail.isSuccess);
});
</script>
In a plain iframe, listen for the messages instead:
<script>
window.addEventListener("message", (event) => {
if (event.data?.embedId !== "add-place") return;
if (event.data.type === "place-form-submitted") {
console.log("Submitted:", event.data.data);
}
});
</script>