Skip to main content

Forms

A form is a page that anyone with the link can fill in, with no Lumen account. Each accepted answer becomes a row in a table of yours, and can start a flow. Use one to collect supplier details, requests or sign-ups.

  • Any workspace
  • Public link
  • 0.1 credit per accepted answer

This is not the form of an approval. An approval form is one step in one run: it goes by email to one person, once, and the run waits for it. A public form is a standing page that anyone can submit any number of times, and every answer is a new row.

Public formApproval form
Address/f/<slug> on your app host/forms/<token>, one signed link per run
Who answersAnyone with the link, behind a bot checkThe person the email was sent to
Answers go toA row in a tableFields of one run
How oftenMany times, until it closesOnce
Made inA table's Forms tab, or a Form resourceAn approval node in a flow

Make a form​

  1. Open Databases, pick the database and then the table that should receive the answers.
  2. Switch from Rows to Forms and click Make a form. The form starts with fields made from the table's columns.
  3. In Edit, change each question's text and Help text (optional), tick Required, and reorder, add or remove fields. Add a field from the table lists the columns not yet asked.
  4. On the right, set Title, Description, Message after sending and Language of the page, and switch Taking answers on.
  5. Use Preview to see the page, then click Save. Copy link gives you the address to share.
The Forms tab of the Suppliers table. A line says a form is a page anyone with the link can fill in and every answer is added to this table as a row. A Make a form button is on the right. The table lists one form, Become a supplier, open, with 3 answers, starting 1 flow, at /f/become-a-supplier-demo, with icons to copy, link, edit and delete.The Forms tab of the Suppliers table. A line says a form is a page anyone with the link can fill in and every answer is added to this table as a row. A Make a form button is on the right. The table lists one form, Become a supplier, open, with 3 answers, starting 1 flow, at /f/become-a-supplier-demo, with icons to copy, link, edit and delete.
A table's Forms tab lists its forms with their answers, the flows they start and their link.
The form editor. On the left four question cards: Company name (short text, required), Contact email (email, with the help text Where we send our reply.), What do you supply? (choose one) and Years in business (number), each with move and remove buttons, and Add a field from the table below. On the right Title, Description, Message after sending, Language of the page (English or Hebrew) and a Taking answers switch. Above are Edit and Preview, Use in a flow, copy link and Save.The form editor. On the left four question cards: Company name (short text, required), Contact email (email, with the help text Where we send our reply.), What do you supply? (choose one) and Years in business (number), each with move and remove buttons, and Add a field from the table below. On the right Title, Description, Message after sending, Language of the page (English or Hebrew) and a Taking answers switch. Above are Edit and Preview, Use in a flow, copy link and Save.
The editor: questions on the left, the form's settings on the right.
The public page of the form: a white card titled Become a supplier with its description, then Company name (required), Contact email with the help text Where we send our reply., What do you supply? as a dropdown, Years in business, and a blue Send button. Made with Lumen is written below the card.The public page of the form: a white card titled Become a supplier with its description, then Company name (required), Contact email with the help text Where we send our reply., What do you supply? as a dropdown, Years in business, and a blue Send button. Made with Lumen is written below the card.
What the person sees at the form's link.

The builder covers questions and the page. Limits, patterns, prefill and a redirect after sending are set in YAML.

Fields and columns​

Each field's name is the column its answer is written to, so it must match a column of the target table. A form must ask for every column the table marks required, or it is refused when you apply it.

Field typePage showsFills a column of type
textShort text, up to 500 characterstext
longtextA larger box, up to 10,000 characterstext
emailText that must be an email addresstext
phoneText that must look like a phone numbertext
numberA numbernumber, money
dateA datedate
checkboxA checkbox. Unticked is false.true or false
selectChoose onechoice, or a select column that takes one value
multiselectChoose several, up to 100a select column that takes several

A computed column (a formula) cannot be filled. file is reserved for uploads and is refused for now.

Other field settings:

  • required, help (up to 500 characters), placeholder.
  • options for a select field, up to 100. Left out, the field offers the column's own options. Each option must be one the column accepts.
  • pattern for a text-like field: a regular expression the whole answer must match, checked by the page and again by the server. patternMessage (en and he) is what the person is told.
  • prefill fills a field from another field of the form until the person edits it, for example a workspace name made from a company name with format: slug.

A form holds a list of pages (up to 20), but only one page is shown today: multi-page forms are planned. Conditional fields (showIf) are accepted and ignored for now.

Limits and closing​

SettingCloses the form
open: false (Taking answers off)At once, until you switch it back on.
limits.closeAtAt that time.
limits.perDayAfter that many accepted answers in a day (UTC), until the next day.

A form also reads as closed when the table is full, or when the workspace has used its monthly credit budget. The page says why:

StateThe person reads
Switched offThis form is closed and is not taking answers.
Past closeAtThis form has ended and is not taking answers.
Over perDay or table fullThis form has reached its limit for today. Please try again tomorrow.
Budget usedThis form is closed for now.
No bot check on this installationThis form is not ready yet: the bot check is not set up.

After an accepted answer the person sees your Message after sending, or the default "Thank you, your answer was received.". Set after.redirect to an https address to send them somewhere instead. A message and a redirect cannot both be set.

Protection and cost​

A public form has no sign-in, so two things stand between the page and your table:

  • A bot check. The page shows Cloudflare Turnstile, and the server verifies the token before it accepts an answer. An installation with no bot check set up refuses answers.
  • A rate limit. One address can send 5 answers an hour to one form. More gets "Too many answers from here. Please try again later."

An accepted answer costs 0.1 credit, booked to the workspace, when its plan charges credits. A refused or invalid answer costs nothing. Lumen keeps a log of accepted answers for 90 days (a hashed address and the row, never the answers) for the rate limit and the audit; the answers themselves are the rows in your table.

Answers are checked against the form and then against the table. A table with a key refuses an answer that repeats an existing key: "this answer was already sent".

Start a flow from a form​

The A form is submitted trigger (form-submitted) starts a run for every submission, with the answers as fields typed like the table's columns. It also gives rowId, submittedAt, formName and lang. In the console, the Use in a flow button on a form starts a new flow with this trigger.

new-supplier.yaml (the flow's spec)
spec:
triggers:
- id: submitted
ref: {name: form-submitted}
config: {form: become-a-supplier}
next: [tell]
nodes:
- id: tell
stepRef: {name: send-email}
config:
to: procurement@acme.example
subject: "New supplier: {submitted.name}"
body: "{submitted.name} supplies {submitted.category}. Contact: {submitted.email}."

The form setting names a Form of the workspace. The editor lists the form's questions as the trigger's fields, so later steps can pick them.

The row is already in the table when the run starts, so the flow can update it by rowId. See Databases and tables.

Next steps​