Last updated:
For traditional websites and CMS integration work, embedding uses a script tag and a form container.
defer.data-fc-id must match the form ID from Formcentric.See Client Static for the full Static documentation.
Example:
For React, component-based integration via @formcentric/client-react should be used. The old, DOM-based SPA embedding via window.formcentric.initFormcentric() is no longer the recommended path for new React integration projects.
For details, please see Client React.
For Vue, component-based integration via @formcentric/client-vue should be used. Here too, the modern wrapper path should be preferred to the old DOM-based approach.
For details, please see Client Vue Cloud.
No component is officially supported for Angular at the moment. As a result, the best approach is to use a project-specific wrapper based on the SDK mount path.
For details and an example, see Client Angular.
For direct JavaScript or TypeScript integration projects without framework components, the SDK path is available via mount().
For details, please see Client SDK.
Formcentric cloud integration projects also require a domain stored in Formcentric in the local development environment. In practice, this typically means:
If your bundler or framework can run directly on a matching HTTPS domain, this is often all that is necessary. Otherwise, a reverse proxy is the simplest solution.
A simple approach is a local proxy with Docker and Caddy.
Example Caddyfile:
Example docker-compose.yml:
The proxy can then be started with: docker compose up -d.
Your application should then be accessible at https://DOMAIN.TLD.
Next, you need to add a corresponding host entry in /etc/hosts so that the desired dev domain points to your local machine.
Example:
After that, the domain must be approved in your Formcentric Cloud admin account. Please refer to the article Managing domains for further details.
Only after this step can the proxy be started with: docker compose up -d. Your application should then be available at https://DOMAIN.TLD . DOMAIN.TLD is a placeholder for your chosen development domain.
Many bundlers and frameworks offer direct support for a proxy or host configuration:
The actual technology used here is less important than the target condition:
Common sources of errors include:
embedIdsrcUrl, dataUrl, formappUrl or designUrldefer missing for Static