Email field

A text input with email-address validation and an email-friendly on-screen keyboard on mobile.

The Email field is a single-line text input pre-configured for email addresses. It validates the value against an RFC-5322-lite regex on blur and on submit, sets

inputMode="email" so mobile devices show the email keyboard, and disables autocorrect.

It binds to SharePoint's Text column type (SP doesn't have a dedicated Email column).

Common properties

PropertyDescription
label
string
Visible label.
description
string
Helper text under the label.
placeholder
string
default: "name@example.com"
Greyed example text.
required
boolean
default: false
Marks the field required.
readOnly
boolean
default: false
Disables editing.

Type-specific properties

PropertyDescription
allowedDomains
string[]
Optional allow-list. e.g. ["company.com"] rejects addresses outside those domains at validation time.
multiple
boolean
default: false
Accept a comma-separated list of addresses. Each is validated individually.

JavaScript recipes

Read & normalise the value

const email = (f365.field('ContactEmail').value ?? '').trim().toLowerCase();

Pre-fill from the current user

f365.events.onLoad(() => {
  if (!f365.field('ContactEmail').value) {
    f365.field('ContactEmail').value = f365.user.current().email;
  }
});

Custom validation: reject free providers

const FREE = ['gmail.com', 'outlook.com', 'yahoo.com', 'hotmail.com'];
f365.field('ContactEmail').on('validate', (value) => {
  const domain = (value ?? '').split('@')[1]?.toLowerCase();
  if (FREE.includes(domain)) return 'Please use your work email address.';
});

Related articles

  • Text field

    Single-line text input, the foundation field for names, codes, and short free-text.