URL field
A text input for web addresses, clickable when read-only, validated for valid URL syntax on submit.
The URL field captures a web address. In edit mode it's a text input with
URL validation; in read-only/display mode it renders as a clickable link. Binds to
SharePoint's Text column.
For SharePoint Hyperlink or Picture columns (which store a separate label),
use the Hyperlink field instead.
Common properties
| Property | Description |
|---|---|
labelstring default: Website | Visible label. |
descriptionstring | Helper text. |
requiredboolean default: false | Marks the field required. |
readOnlyboolean default: false | Disables editing, the address still renders as a clickable link. |
Type-specific properties
| Property | Description |
|---|---|
placeholderstring default: https:// | Placeholder shown in the empty input. |
patternstring (regex) | Custom validation regex the entered URL must match. Layered on top of the built-in URL-syntax check. |
patternMessagestring | Error message shown when the value fails pattern. |
JavaScript recipes
Read and set the address
const site = f365.field('Website').value as string | null;
f365.field('Website').value = 'https://example.com';
Normalize a bare domain to https on change
f365.events.onChange((e) => {
if (e.fieldKey !== 'Website') return;
const v = String(e.newValue ?? '').trim();
if (v && !/^https?:\/\//i.test(v)) {
f365.field('Website').value = `https://${v}`;
}
});
Block save when the URL is invalid
f365.events.onBeforeSave(() => {
const { valid } = f365.field('Website').validity();
if (!valid) {
f365.ui.showToast('Enter a valid website address before saving.', 'error');
return false;
}
return true;
});
Related
Related articles
- Hyperlink field
A SharePoint Hyperlink-or-Picture column, URL + display label stored together.
- Text field
Single-line text input, the foundation field for names, codes, and short free-text.