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
| Parameter | Type | Default | Description |
|---|---|---|---|
theme or themeName | string | - | Theme slug. Sets the accent and header colors, intro message, required fields and auto-tags; URL parameters still win. |
accentColor | color | theme, else #7209B7 | Buttons, section underlines and links. |
headerColor | color | theme primary color | 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 pastes an event URL to fill in the form. |
quickImportTitle | string | Quick Event Add | Quick-import header title. |
quickImportDescription | string | Have an event URL? We'll auto-fill all the details for you | Quick-import header text. |
showAiSuggest | boolean | true | Show the Generate AI suggestion button beside the description. |
eventInstructions | string | theme intro message | Text 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. |
maxWidth | string | lg | Form width: xs, sm, md, lg or xl. |
submitButtonPosition | string | fixed | fixed 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. |
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. @import, url() and image-set() are removed, so the CSS can't load files. |
Fields and validation
| Parameter | Type | Default | Description |
|---|---|---|---|
requiredFields | list | name,start_date,description | Fields 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. |
requireGeocodedLocation | boolean | false | With location required, accept only a venue picked from the suggestions, not typed text. |
customFields | json | - | 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. |
lat | number | - | Latitude that venue suggestions favor. Needs lng. A boundary-scoped theme's center takes precedence. |
lng | number | - | Longitude that venue suggestions favor. Needs lat. |
Submissions
| Parameter | Type | Default | Description |
|---|---|---|---|
autoTags | string | - | Tags added to every submission, separated by | (for example community|family). Added to the theme's auto-tags. |
customerAlertEmails | list | - | Email addresses that get a notice for each new submission. |
customer | string | - | Customer identifier sent with each submission. |
list | string | - | 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. |
submitMode | string | submit | log 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
initialName | string | - | Event name. |
initialDescription | string | - | Description. |
initialUrl | string | - | Event link. |
initialStartDate | string | - | Start, as YYYY-MM-DDTHH:mm in the venue's local time. |
initialEndDate | string | - | End, in the same format. |
initialVenue | string | - | Venue name. |
initialAddress | string | - | Street address. |
initialOrganizer | string | - | Organizer name. |
initialOrganizerEmail | string | - | Organizer email. |
initialPrice | string | - | Price text, such as $10-$25. |
initialIsFree | boolean | false | Mark the event free. Takes true only. |
initialIsOnline | boolean | false | Mark the event online. Takes true only. |
initialRecurrence | string | - | Repeat rule, such as RRULE:FREQ=WEEKLY;BYDAY=TH. Must include RRULE: or RDATE:. |
initialTags | list | - | Tag slugs. |
initialVibes | list | - | Vibe slugs. |
initialCategories | list | - | Category slugs. |
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 |
|---|---|---|
event-form-submitted | { embedId: "add-event", data }: the saved event, or with submitMode=log the event that would have been sent | A 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>