Skip to main content

Add Event Form Embed

The add event form lets visitors submit an event to your calendar. Submissions go to your review queue in the Hub. Put it on a "Submit an event" page beside your calendar embed.

Embed code​

<div id="vibemap-add-event"></div>
<script
src="https://web.vibemap.com/load.js"
data-iframe-el="vibemap-add-event"
data-resize="true"
data-url="https://web.vibemap.com/embed/add-event?accentColor=1d6fa5&requiredFields=name,location,start_date"
></script>

Add theme=<your-theme-slug> to apply your theme's colors, intro message, required fields and auto-tags. The Hub's embed builder adds it for you.

Parameters​

Booleans take true or false, or 1 or 0. Colors take hex with or without # (1d6fa5 or %231d6fa5). 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; URL parameters still win.
accentColorcolortheme, else #7209B7Buttons, section underlines and links.
headerColorcolortheme primary colorBackground of the quick-import header.
headerTextColorcolor#ffffffText color in the quick-import header.
showAISearchbooleantrueShow the quick-import header, where a visitor pastes an event URL to fill in the form.
quickImportTitlestringQuick Event AddQuick-import header title.
quickImportDescriptionstringHave an event URL? We'll auto-fill all the details for youQuick-import header text.
showAiSuggestbooleantrueShow the Generate AI suggestion button beside the description.
eventInstructionsstringtheme intro messageText or HTML shown under Add Event 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.
maxWidthstringlgForm width: xs, sm, md, lg or xl.
submitButtonPositionstringfixedfixed keeps the submit bar on screen as the form scrolls; bottom leaves it at the end of the form. It shows only in a fixed-height frame that scrolls.
inDialogbooleanfalsetrue drops the form's full-window minimum height, for a form shown in a dialog.
customCSSstring-CSS added to the form page. @import, url() and image-set() are removed, so the CSS can't load files.

Fields and validation​

ParameterTypeDefaultDescription
requiredFieldslistname,start_date,descriptionFields a visitor must fill in: name, location, start_date, end_date, description, link, organizer, organizer_email, or a custom field's name. Signed-in visitors skip organizer_email.
requireGeocodedLocationbooleanfalseWith location required, accept only a venue picked from the suggestions, not typed text.
customFieldsjson-Extra fields: a JSON array of {"id", "name", "label", "type", "section"} objects. type is text, email, number, select, checkbox, textarea, date, tel or url; section is info, location, details, organizer or custom. Optional keys: placeholder, helperText, defaultValue, options ([{"value", "label"}] for select). Each value is sent with the submission under its name.
latnumber-Latitude that venue suggestions favor. Needs lng. A boundary-scoped theme's center takes precedence.
lngnumber-Longitude that venue suggestions favor. Needs lat.

Submissions​

ParameterTypeDefaultDescription
autoTagsstring-Tags added to every submission, separated by | (for example community|family). Added to the theme's auto-tags.
customerAlertEmailslist-Email addresses that get a notice for each new submission.
customerstring-Customer identifier sent with each submission.
liststring-List slug. Each new event is added to that list and gets its auto-tags. The Hub adds it to a list's form link.
submitModestringsubmitlog runs validation and fires the submit events without saving anything. Use it to test your page.

Prefill​

Each prefill parameter fills one field when the form opens. A pasted event URL replaces them.

ParameterTypeDefaultDescription
initialNamestring-Event name.
initialDescriptionstring-Description.
initialUrlstring-Event link.
initialStartDatestring-Start, as YYYY-MM-DDTHH:mm in the venue's local time.
initialEndDatestring-End, in the same format.
initialVenuestring-Venue name.
initialAddressstring-Street address.
initialOrganizerstring-Organizer name.
initialOrganizerEmailstring-Organizer email.
initialPricestring-Price text, such as $10-$25.
initialIsFreebooleanfalseMark the event free. Takes true only.
initialIsOnlinebooleanfalseMark the event online. Takes true only.
initialRecurrencestring-Repeat rule, such as RRULE:FREQ=WEEKLY;BYDAY=TH. Must include RRULE: or RDATE:.
initialTagslist-Tag slugs.
initialVibeslist-Vibe slugs.
initialCategorieslist-Category slugs.

Events and sizing​

The form reports its height like every embed; see Embedding and sizing.

It also tells your page about submissions:

MessagePayloadSent when
event-form-submitted{ embedId: "add-event", data }: the saved event, or with submitMode=log the event that would have been sentA submission succeeds
event-form-message{ embedId: "add-event", 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:event-submitted carries the event in e.detail; vibemap:form-message carries { message, isSuccess, embedId }:

<script>
const container = document.getElementById("vibemap-add-event");
container.addEventListener("vibemap:event-submitted", (e) => {
console.log("Submitted:", e.detail);
});
container.addEventListener("vibemap:form-message", (e) => {
console.log(e.detail.message, e.detail.isSuccess);
});
</script>