Getting Started with Factorial Code Forms
Enable Factorial Code Form
Section titled “Enable Factorial Code Form”The first step is to create your Factorial Code process and configure the input parameters that will define form fields.
With these input parameters configured, it is time to enable the forms feature. Simply visit the process Dashboard and enable the Form switch in the Trigger from Factorial section.
Restrict who can open the form
Section titled “Restrict who can open the form”The Authentication field next to the Forms flag decides who may read the form schema and submit it:
- Factorial users of the company that installed the app: the form URL is closed to anonymous requests. The only credential it accepts is a Factorial Code token of a member of the workspace, which the playground link on the process dashboard sends for you. Every other request gets the same
404as a form that does not exist or is not enabled, so the URL does not reveal to an outsider which processes or forms a workspace has. - Public access: anyone who knows the form URL can open and submit it.
Every form requires a Factorial user unless you choose public access. Forms created before this field existed were migrated to require one.
A form your customers open from inside Factorial needs no change. The install, settings and uninstall screens, the forms an app offers on its own page and the UI trigger dialog all go through Factorial Actions: Factorial authenticates the person and submits through its own backend. Public access is for a form you hand to people who have no Factorial account at all.
The same setting lives in the process metadata.json as form.authMode, so it travels with your code through fcode pull and fcode push:
{ "form": { "enabled": true, "authMode": "FACTORIAL" }}In a process that uses the factorial block, form.public is the same switch and the one to prefer. Ticked it writes authMode: NONE, cleared it writes FACTORIAL, and the platform keeps the two mirrored:
{ "factorial": { "enabled": true, "form": { "enabled": true, "public": true } }}A push always sends form.public when the block is present, so a form you opened from the dashboard goes back to requiring an account on the next push from a file that does not say "public": true. Run fcode pull first, or keep the flag in the file.