You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5ccab09
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: content/docs/ui/forms.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Both modes:
20
20
- Honor `?prefill_<field>=<value>` URL params
21
21
- Honor `submitBehavior` (thank-you / redirect / continue / next-record) — with **mode-aware defaults** when it is omitted (see [§8](#8-submitbehavior--what-happens-after-submit))
22
22
23
-
A **public form** is the Salesforce *Web-to-Lead* style embeddable form — declare a `FormView` with `sharing.allowAnonymous: true`, give it a `publicLink`, and the framework wires the anonymous REST endpoints automatically.
23
+
A **public form** is the Salesforce *Web-to-Lead* style embeddable form — declare a `FormView` with `sharing.enabled: true` and `sharing.allowAnonymous: true`, give it a `publicLink`, and the framework wires the anonymous REST endpoints automatically. Clearing either switch withdraws the form from every anonymous endpoint.
24
24
25
25
## Architecture at a glance
26
26
@@ -86,7 +86,7 @@ export default defineView({
86
86
},
87
87
],
88
88
sharing: {
89
-
enabled: true,
89
+
enabled: true,// ← required (the schema default is false)
90
90
allowAnonymous: true, // ← required
91
91
publicLink: '/forms/contact-us', // ← the slug ":contact-us" wires this view to the public route
92
92
},
@@ -99,7 +99,7 @@ export default defineView({
99
99
> - The slug in `publicLink` (`contact-us`) becomes the `:slug` segment in the REST URL.
100
100
> - Anything not in the `sections[].fields[]` whitelist is silently stripped at submit time. Treat the whitelist as the form's authoritative "what the public is allowed to set" list.
101
101
> - A form whose sections declare **no** fields collects nothing, so the submit is **refused** (`400 VALIDATION_ERROR`) rather than accepting whatever the caller sent (#6920). Its `GET /forms/:slug` publishes no schema either (#6601) — declare the fields and both planes come alive together.
102
-
> - Multiple form views per object are fine — only the one(s) with `sharing.allowAnonymous === true` are exposed.
102
+
> - Multiple form views per object are fine — only the one(s) with `sharing.enabled === true` and `sharing.allowAnonymous === true` are exposed.
103
103
104
104
## 2. (Optional) Create the `guest_portal` permission set
105
105
@@ -230,7 +230,7 @@ Errors:
230
230
|`400 VALIDATION_ERROR`| the form's sections declare **no** fields, so it collects nothing — wire the fields and resubmit (#6920) |
0 commit comments