WidgetsEnquiry form

Enquiry form widget

window.MedosEnquiry — a contact form that files an enquiry against your Medos workspace instead of landing in an inbox.

The enquiry form is for the visitor who isn't ready to book. It takes their details and a message, and files the enquiry against your workspace where staff can respond to it — no mail server, no form backend, no spam bucket.

<script src="https://widgets.medos.one/v2/enquiries.js"></script>
<div id="medos-enquiry"></div>
<script>
  MedosEnquiry.init({
    apiKey: "mk_your_publishable_key",
    mode: "inline",
    containerId: "medos-enquiry",
    onSuccess: (enquiry) => console.log("Enquiry filed", enquiry.inquirySubject),
  });
</script>

The bundle is self-contained and exposes one global, window.MedosEnquiry. Install › CDN covers deferring the tag and loading it on demand.

What the patient fills in

A single screen, then a confirmation screen. Every field is validated inline before the form will submit.

FieldNotes
Full nameRequired.
Email addressRequired, format-checked.
Country code + phoneRequired. The code is picked from a list.
SubjectRequired. What the enquiry is about.
MessageRequired. The enquiry body.
Preferred contact methodPHONE, EMAIL, or BOTH.

There is no OTP step — an enquiry isn't a booking, so the contact details are taken at face value and confirmed by whoever follows up.

Try it

Configure it below and copy the snippet. The colour and font controls emit a nested theme object; the flat shortcuts such as primaryColor work too.

Enquiry form

A contact form that files an enquiry against your workspace. Theme object only.

window.MedosEnquiry

Custom theme

This widget takes a PartialTheme object rather than a theme name or the flat primaryColor shortcuts, so these controls are emitted as a nested theme.

View

Sizes the preview frame only. This widget takes no maxHeight, so the value never reaches the snippet.

Live preview
index.html
<div id="medos-enquiry" style="min-height: 600px"></div>

<script src="https://widgets.medos.one/v2/enquiries.js"></script>

<script>
  MedosEnquiry.init({
    apiKey: "mk_your_publishable_key",
    mode: "inline",
    containerId: "medos-enquiry",
    onSuccess: (enquiry) => console.log("Enquiry filed", enquiry),
    onError: (err) => console.error(err),
  });
</script>

The `onSuccess` payload is personal data

Name, email, and phone all reach your handler — this callback fires with what the patient typed, not with a server-assigned id. Don't forward it to analytics; push an event without the fields. See the PII note in Analytics recipes.

Open it from a "Contact us" button

init({ mode: "modal" }) opens the modal straight away, so don't call it on page load. The enquiry widget's open() can be the first call: pass the config to it from the click handler.

<script defer src="https://widgets.medos.one/v2/enquiries.js"></script>
<button id="contact-btn">Contact us</button>
<script>
  document.getElementById("contact-btn").onclick = () =>
    MedosEnquiry.open({
      apiKey: "mk_your_publishable_key",
      onSuccess: () => {
        window.dataLayer?.push({ event: "medos_enquiry_submitted" });
      },
    });
</script>

The modal closes itself 3 seconds after a successful submission, which fires onClose just as a manual dismissal would.

In this section

On this page