The URL field collects a web address and stores it as a string.
Options and validation
URL fields accept the shared required, description, placeholder, visibleIf, and maxLength options. A valid answer must include http:// or https://. Other protocols like javascript: and data: are rejected, because a stored answer may later be rendered as a link.
The current schema won't add https:// for you, and it doesn't test whether the destination is reachable.
Add a URL field
In the dashboard, select Add block, choose URL, and use placeholder copy that shows the required protocol.
ts
const websiteField = {
id: "website",
kind: "url",
label: "Company website",
placeholder: "https://example.com",
maxLength: 2048,
} as const;Related
- Short text: Collect a handle or path that isn't a complete URL.
- Schema and validation: See how client and server validation stay aligned.
- Security and boundaries: Treat respondent-provided links as untrusted input.