Website booking widget
Put the HyoNova booking form on your own website — in the page or behind a button — with the copy-and-paste code, the allowed websites list and what the widget shares.
On this page
The website widget shows your booking form inside your own website, so visitors book without leaving it. It is the same form as the booking page, with the same rules: no account, one booking per time, and a private link for the visitor. The widget renders only on the websites you allow.
Turn the widget on#
- Open the settings. Go to Bookings › Page & widget.
- Turn on Website widget is on. "The booking form can be embedded in the websites listed below."
- Add your website. Under Websites that may show the widget, enter a domain such as
example.comor*.example.comand choose Add website. See Allowed websites. - Choose the layout. Widget layout is In the page or Button that opens it.
- Save, then copy the code from Share and embed.
Copy the code#
Under Share and embed, choose the Service (All services or one booking type), the Language, the Widget layout and, for the button, the Button text. Then copy Website code (JavaScript) and paste it into your website's HTML where the form or the button should appear.
Always copy the real code from HyoNova: it contains the correct booking address and your company's address name. The examples below show its shape.
In the page#
The form appears where you paste the code, up to 760 pixels wide and centred, and grows and shrinks with its content.
<script async src="https://YOUR_HYONOVA_BOOKING_ADDRESS/book/widget.js" data-company="your-company" data-type="intro-call" data-mode="inline" data-color="#2f6bff"></script>Button that opens it#
A button appears where you paste the code. Selecting it opens the form in a dialog over your page.
<script async src="https://YOUR_HYONOVA_BOOKING_ADDRESS/book/widget.js" data-company="your-company" data-mode="button" data-color="#2f6bff" data-label="Book an appointment"></script>What the attributes mean#
| Attribute | Meaning |
|---|---|
src | The widget script at HyoNova's booking address |
data-company | Your company's address name, as in your booking link |
data-type | Optional. The Link name of one booking type. Without it, the visitor chooses from all published services |
data-mode | inline for the form in the page, button for a button that opens it |
data-lang | Optional. en or ar. Without it, the form follows the language of your page, then your booking settings |
data-color | The accent colour, as a six-digit hex colour |
data-label | Button mode only. The button text; empty uses "Book an appointment" |
data-target | Optional, in-page mode only. A CSS selector of the element that should hold the form, instead of the place of the script tag |
The code contains no key and no secret: the company and type names are public, like your booking link. What protects the widget is the allowed websites list.
Good to know:
- The script loads
async, so it does not slow your page down. - The form runs in its own frame on HyoNova's booking address. Your site's styles and scripts do not reach it, and it does not read anything from your page.
- If your website uses a Content Security Policy, allow HyoNova's booking address in
script-srcandframe-src. - Website builders usually have a place for "custom code" or an "HTML block". Paste the code there.
- The widget cannot be previewed inside HyoNova. Open your own page to see it.
Frame code (iframe)#
Share and embed also offers Frame code (iframe): a plain frame with a fixed height, for site builders that accept a frame but no script. Prefer the JavaScript code: only it adjusts the height of the form to its content and can open the form from a button. Both codes work on your allowed websites only, and a booking made through either is checked against that list.
Allowed websites#
"The widget loads only on these websites. The booking page itself needs no entry here." You can list up to 50 entries.
| Entry | Matches | Does not match |
|---|---|---|
example.com | https://example.com | https://www.example.com, https://shop.example.com |
www.example.com | https://www.example.com | https://example.com |
*.example.com | https://www.example.com, https://shop.example.com | https://example.com itself |
- Add both
example.comand*.example.comif the widget should run on the main domain and on its subdomains. - HTTPS only. Pages served over plain
http://cannot show the widget. - An empty list allows no website. HyoNova then reads: The widget renders only on allowed websites, and none is listed yet. Add your website above. Your booking links keep working.
HyoNova checks the website twice. The browser refuses to show the form in a frame on a website that is not on your list, and when a booking is made, HyoNova checks again that it comes from an allowed website. The form learns which website embeds it from the browser, not from anything the page says.
On a website that is not allowed, the form does not appear: an in-page widget folds away instead of leaving an empty block, and a booking attempt is refused with Booking is not available from this site.
Turning the widget off#
Turn Website widget is on off to stop the widget on every website at once. The code on your website then shows nothing, and Share and embed reads: The website widget is switched off, so the code shows nothing on a website yet. Your booking page and its links are not affected; they have their own switch, Booking page is on.
Bookings from the widget#
A booking made through the widget is a normal booking. In the Bookings list its Booked through column reads Website widget, and the visitor gets the same private link.
Privacy#
- What the widget shares with your page: only the height of the form, so the frame fits. Nothing the visitor types is visible to your website's scripts.
- What HyoNova receives: the booking the visitor makes, and the address of the website that embeds the widget, so it can be checked against your list.
- No sign-in. Visitors do not sign in to book.
- Mention online booking in your website's privacy notice. See Privacy.
Status#
| Feature | Status | Notes |
|---|---|---|
| Website booking widget | BetaWorks today in early-access workspaces. Behaviour and limits may still change. | The booking form inside your own website, in the page or behind a button, only on the websites you allow. |
| Public booking page and private link | BetaWorks today in early-access workspaces. Behaviour and limits may still change. | A hosted page where visitors choose a service and a time, and a private link to view, move or cancel their booking. |
Was this page helpful?
Thanks. Page ratings are not collected yet, so nothing was sent. If something is missing or wrong, see the Get help page.