Skip to main content

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​

ParameterTypeDefaultDescription
theme or themeNamestring-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.
accentColorcolortheme accent, else #7209B7Buttons and section underlines.
headerColorcolortheme accent, else #7209B7Background of the quick-import header.
headerTextColorcolor#ffffffText color in the quick-import header.
showAISearchbooleantrueShow the quick-import header, where a visitor searches for a business or pastes its website to fill in the form.
quickImportTitlestringQuick ImportQuick-import header title.
quickImportDescriptionstringSearch for a business or paste a website URL to auto-fill the detailsQuick-import header text.
maxWidthstringlgForm width: xs, sm, md, lg or xl.
submitButtonPositionstringbottomfixed makes the submit bar sticky. It helps only in a fixed-height frame that scrolls.
instructionsstringtheme intro messageText 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.
inDialogbooleanfalsetrue drops the form's full-window minimum height, for a form shown in a dialog.
customCSSstring-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​

ParameterTypeDefaultDescription
requiredFieldslisttheme's required fieldsFields 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​

ParameterTypeDefaultDescription
autoTagsstring-Tags added to every submission, separated by | (for example local|retail). A theme with its own place-form auto-tags replaces these.
customerstring-Customer identifier sent with each submission.
liststring-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.
submitModestringsubmitlog fires the submit events without saving anything. Use it to test your page.
latnumber-Latitude that place suggestions and the duplicate check favor. Needs lng.
lngnumber-Longitude that place suggestions and the duplicate check favor. Needs lat.

Prefill​

ParameterTypeDefaultDescription
initialNamestring-Business name.
initialDescriptionstring-Description.
initialUrlstring-Website.
initialAddressstring-Street address.
initialTagslist-Tag slugs.
initialVibeslist-Vibe slugs.
initialCategorieslist-Category slugs.

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.

ParameterTypeDefaultDescription
placestring-Slug of the business to edit. Set by the link.
t or tokenstring-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:

MessagePayloadSent when
place-form-submitted{ embedId: "add-place", data }: the saved place, or with submitMode=log the place that would have been sentA 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>