Add a form to a page

Add a form to a page in an app so visitors can fill something in. For example, a registration, a request or a change to their own details.

How a form works

A form belongs to a data structure and fills it with data. You create the form in Orchestra, then add it to a page in the CMS with the Form block.

The CMS determines where the form appears and which texts the visitor sees around it. What happens to a submission, such as starting a process, you set up in Orchestra. See Connect a form to a process.

Step 1: create the form in Orchestra

  1. Open Orchestra and go to Data structures. Open the data structure the data should go into.
  2. On the Forms tile, click Add form.
  3. Give the form a name and choose who can fill it in: Everyone (also without logging in) or Only logged-in users.
  4. Open the form with Edit and set up the fields. Save the form.

After you save, the next steps are shown. You can use the form in a process, or add it to an app with the CMS.

Step 2: add the form to a page

  1. Open the page in the CMS and click Add content in a column.
  2. Choose Form. The block settings appear.
  3. In Form, choose the form you created in Orchestra.
  4. In Mode, choose Add (create a new record) or Edit (change an existing record).
  5. Optionally, fill in the texts: Description above the form, Disclaimer below the form, Text after sending and Text on an error.
  6. Click Save. The Form block now appears on the page. Click View the page to see the form as a visitor sees it.
A Form block on the Duinzicht page Mail aan klant in the CMS, below a Record detail block that shows the customer. Below the blocks is the Add content button.

What the visitor sees after submitting

These settings are on the Form block in Add mode.

SettingWhat it does
Text after sendingThe confirmation after a successful submission. If you leave it empty, the visitor sees: Thank you, your submission has been sent.
Text on an errorThe text shown if the submission fails. If you leave it empty, the visitor gets a standard message asking them to try again.
Text on the submit buttonSay what the button does, for example Send request. If you leave it empty, the button says Submit form.
Destination pageAfter submitting, the visitor goes to this page of the same app. A block on that page can show the record that was just saved.
Show the button 'Add another' after sendingLets the visitor fill in another one straight away, with an empty form.
Link in the success message toA link in the confirmation to a page of the same app, for example the overview. Use Text of the link to set the text; if you leave it empty, it says Continue.
Show a link to StatusQuo after sendingFor internal apps only: after submitting, an employee can follow the process in StatusQuo. Leave this off on a public website.

If you choose a destination page, you can't combine it with the 'Add another' button or the link in the success message, because the visitor goes straight to that page.

If the submission starts a process, the block waits for the outcome. The visitor first sees that the request is being processed, and then whether it succeeded.

Let visitors edit an existing record

In Mode, choose Edit (change an existing record). The form then shows the data of a record, and the visitor changes it.

  • The block gets the record from the page. Usually the visitor opens the page by clicking a row in a data table.
  • If no record has been chosen, the visitor sees: Select a record to edit first.
  • The data structure needs one API to read records and one to update them. If either is missing, you can't save the block. Ask the administrator of your environment for that API.

A form linked to a record

On a detail page, for example of a project, you often want to add something that belongs to that project, such as a task. The form can fill in the project itself:

  • In Preset link field, choose the field that refers to the project. The form fills that field with the project of the page.
  • If more fields need to be filled in in advance, use More prefill fields. For each field, choose whether the visitor sees it and can change it.
  • Tick Only show the form with a parent value if the form must never be filled in on its own. Without a project, the visitor then sees a message instead of the form.
  • In After sending go to the record of, choose The record this form came from if the visitor should return to the project afterwards. You also need to choose a destination page for this.

See also