cardinal

Web Forms

Let visitors and portal users create and edit Records from the website.

A Web Form puts a form for one RecType on the website. Visitors fill it in without the desk. Only a System Manager creates Web Forms.

The RecType must opt in with allow_web_form: true in its YAML, or Allow Web Form on a desk-built RecType. Of core's RecTypes, only Address does.

Example: a contact-us form

Say an app ships a Website Enquiry RecType with allow_web_form: true.

Open /desk/web-form/new. Set Title Contact us and RecType Website Enquiry. Route fills as contact-us.

Add rows to Fields: full_name (Mandatory), email (Mandatory) and message. Set a Label to override the field's own.

Write an Introduction, set Button Label Send and Success Message Thanks, we will reply within a day.

Tick Allow Guest and Published, then save. Visitors can now open /contact-us.

Routes

PathShows
/contact-usThe form, for a new Record
/contact-us/newThe same
/contact-us/listThe signed-in user's own Records, with Show List on
/contact-us/<name>One Record, for users who can read it
/contact-us/<name>/editEditing, with Allow Editing After Submit on

Settings

FieldEffect
PublishedThe form is live
Allow GuestVisitors who are not signed in may submit, 10 a minute per address
Allow Multiple ResponsesWithout it, a signed-in user keeps one Record
Show ListSigned-in users see their own Records at /<route>/list
List ColumnsThe list's columns. Empty uses the title, status and list view fields
Allow DeleteUsers delete their own Records from the list
Allow Editing After SubmitUsers who can write a Record edit it at /<route>/<name>/edit
Success URLA path on this site to go to after a submit, such as /me

Each field row can also be Read Only or Hidden. A form takes only the RecType's level 0 fields of plain data types. Attach fields upload with the submit.

What a form can write

The form writes only the fields it lists. A published form gives its users the right to create Records of that RecType through it, and Allow Delete the right to delete their own. Everything else follows the user's normal permissions.

A route that a page, a reserved path or another form already uses is refused on save.

On this page