Embedding Forms and Content
You don't have to build your whole website in Qik to use it. You can drop a Qik form into any existing website with a single line of code, share a hosted link to a form, or show a Qik-built site or app inside another site. This article covers each option and what to watch out for.
Which option should I use?
| You want to… | Use |
|---|---|
| Put a registration, enquiry or sign-up form on a website built elsewhere (WordPress, Squarespace, Wix, a custom site) | Get Embed Code (a form embed script) |
| Send people a link to a form by email, SMS or social media | Public Form Link or Get QR Code |
| Show a whole page or app you built in Qik inside another website | An iframe, allowed with Allow Embedding On |
| Have a developer load Qik content into a custom site or app | An application's API key, limited by its permissions |
Embedding a form on another website
- Go to Forms and find the form.
- Open the form's actions menu and choose Get Embed Code (in the Form group).
- If the form isn't public yet, Qik asks whether to make it public. Embedded forms must be public so that anyone visiting your website can fill them in. Confirm to continue.
- The embed code is copied to your clipboard. It looks like this:
<script src="https://api.qik.dev/form/<form id>/embed.js"></script> - In your website editor, add an HTML / code / embed block where the form should appear, and paste the code.
The script replaces itself with the form, so the form appears exactly where you put the code. You can embed several different forms on the same page, each with its own line.
Things to know about embedded forms
- Changes can take a few minutes to appear. The form's design is cached for up to five minutes, so after you edit fields or wording, the embedded version may briefly show the old version.
- Deactivated forms stop working. If a form is set to inactive, the embed shows that the form is no longer available instead of the form.
- Submissions land in Qik as normal. They appear with the form's other submissions and run the same automations. See Managing Form Submissions and Form Requests and Automation.
- Your website's code-block feature must allow scripts. Some website builders strip
<script>tags on certain plans, or only allow them in specific "embed" or "custom code" blocks. If the form doesn't appear, check your website builder's help for adding custom JavaScript. - Making a form public is a real change. Anyone with the link or embed can see and submit it. Only make public the forms you intend the public to use.
Sharing a form link or QR code
If you'd rather link to a form than embed it, open the form's actions menu and choose Public Form Link. Qik offers to make the form public if needed, then opens the hosted form page, so you can copy its address to share. Get QR Code produces a QR code that opens the form, handy for posters, flyers and reception desks. For a short, memorable address, see Short URLs and QR Codes.
Showing a Qik site or app inside another website
A website or app built with the Qik interface builder runs on its own address (a .sandbox.qik.dev address or your own domain). To show it inside another site with an <iframe>, you must first allow that site to embed it. By default, browsers are told not to let other sites frame your Qik site, which protects it from click-jacking.
- Go to Apps and open the application.
- On the Configuration tab, find Allow Embedding On.
- Add each website that may embed it, as an origin: the scheme and domain only, for example
https://www.acme.com. If you paste a full page address, Qik trims it back to the origin. You can use a wildcard for subdomains, such ashttps://*.acme.com, or enter*on its own to allow any site. - Save the application, then add an iframe pointing at your Qik site's address on the other website.
Leave Allow Embedding On empty unless you need it, and avoid * for anything that involves signing in or entering personal details.
Loading Qik content with an API key (for developers)
Developers building a custom website or app can read and write Qik content directly through the API using an application's Static Access Token. Create an application with New Application → API Key, then grant it only the roles and scopes it needs on the Permissions tab. See Application Settings and Application Access Control.
Any token used in a browser is visible to visitors, so treat it as public. Its Application Permissions should only allow what is safe for anyone to see or do. Keep tokens with broader access on servers you control, and use Regenerate token if one leaks.
Permissions
- Getting embed code or a public link for a form needs permission to view the form. Making it public needs permission to edit it. If you can't change its visibility, Qik tells you and doesn't hand out a link that won't work.
- Changing Allow Embedding On needs permission to edit the application.