Embedded Integration
The Embedded integration lets you generate a link, QR code, or JavaScript snippet for your Smartform, making it easy to share and prefill fields when users access the form.
Creating an Embedded Integration
- In the Embedded section, click New.
- Enter a name for your integration and click Create.
Managing Embedded Integrations
- All integrations are listed in a table.
- Use the ⋯ (three-dots) menu on the right to access integration options.
Integration Options
Javascript / Link Toggle
Switch between:
- JavaScript: Embed a button or trigger in your webpage that opens the Smartform.
- Link: Use a direct URL or QR code.
Link Tab
Location
Displays the direct URL to your Smartform.
QR Code
Click Refresh to generate a QR code for the Smartform link.
You can Copy or Download the QR code.
Parameters
- Select a property from your Smartform and set an initial value.
- When a user opens the form via the link or QR code, the selected field will be prefilled.
💡 Tip: Use parameters to pass prefilled data and speed up form completion.
JavaScript Tab
When the JavaScript option is toggled on, you can embed a ready-to-use code snippet in your site.
This snippet will add a “Create form” button that opens your Smartform in a new tab.
<!-- Add this button where you want it to appear -->
<input id="689dad97983737779f392f09" type="button" value="Create form"/>
<!-- Include this script at the bottom of your page -->
<script>
window.onload = () => {
const element = document.getElementById("689dad97983737779f392f09");
element.addEventListener('click', () => {
fetch('https://api.smartforms.stage.metaforcelabs.com/api/javascriptIntegrations/v1/dialogValues', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
token: '536595901143895766083272136482165607490233752661099715008845270'
})
})
.then(res => res.json())
.then(data => window.open(data.url, "_blank"));
});
};
</script>