Skip to main content
@yorlet/js iframes your hosted qualification form so leads can enquire from your own site. The form authenticates itself — you never put a secret key in the browser.

Install

Use a publishable key (pk_…) with the form token. Do not put a secret key or restricted key in the website. The publishable key only unlocks the hosted form for your account — it cannot create enquiries on its own.

Embed a qualification form

Copy a publishable key from API keys and the form token from a qualification configuration. The token is shown in the Form token column and on the configuration’s details page. It is not the configuration object id (lqc_…).
mount returns a handle with unmount(), which removes the iframe and stops listening for messages.

Options

The first argument can be a CSS selector or an HTMLElement.

Testing against a local hosted app

You do not need origin in production. Yorlet.init() already loads the form from the production hosted app. Pass origin only when you are testing against a local frontend-app:

What happens after submit

The lead’s answers are stored on an enquiry in your pipeline. If the same person submits the same form again within seven days, Yorlet updates that enquiry instead of creating another. Pass unit on a listing page so the enquiry records that property. Further submits from the same person add more properties to the same enquiry. You do not need to call the Enquiries API from the page. If you want to send them somewhere else after they finish, handle onComplete — the iframe will not navigate the parent page itself. For a full walkthrough, see Embed a qualification form. If you are using React, use @yorlet/react instead of calling mount yourself.