Skip to content

Text, email, URL, phone, and password ​

These fields store plain text. Pick the one that matches the kind of text, so VX can check its format and your front end knows how to display it.

Text and Textarea ​

Text is a single line: a tagline, a SKU, a subtitle. Textarea is a few lines of plain text without formatting: a short note, an address block. For formatting (bold, links, lists), use Rich text.

Both can limit the length with Min length and Max length. Text also has a display-only prefix and suffix.

Email ​

An email address. A valid address is cleaned when it's saved. An address that isn't valid is saved as typed, with a warning, so a typo is never silently replaced with an empty field.

URL ​

A web address. URL prefix decides what is added when an editor types an address without one: https:// by default, or http://, ftp://, mailto:, a Custom prefix (for example tel:), or None to store exactly what was typed. An address that already starts with a scheme is left alone. Text that can't be a link, such as words with spaces between them, is saved as typed, with a warning. An address with a protocol WordPress doesn't allow in links, such as javascript:, is saved empty, with the same warning.

Phone ​

A phone number in international format, with a searchable country picker that shows each country's flag and calling code. Spaces, dashes and brackets are removed when it's saved, so +351 912 345 678 is stored as +351912345678. That standard format works directly in tel: links.

Set Default country (a two-letter code such as GB) to accept numbers written the way they're dialled inside that country: with it set to GB, 0121 496 0177 is stored as +441214960177. The country picker also starts on that country. 00 in place of +, and a (0) after the country code, are understood either way. A number that still can't be read is saved as typed, with a warning.

Password ​

A secret value, such as a door code or an API token for an integration. VX keeps password values away from the front end: they never appear in dynamic tags or in the Bricks tag picker. A Group or Repeater that contains a password field is protected the same way.

The value is still stored in the database as ordinary meta, readable by PHP code and by administrators. It isn't encrypted.

Technical details for LLMs
  • Type keys and settings: text (placeholder, default_value, prefix, suffix, minlength, maxlength); textarea (placeholder, default_value, minlength, maxlength); email (placeholder, default_value); url (placeholder, default_value, url_prefix: https:// (default) | http:// | ftp:// | mailto: | custom | none, url_prefix_custom); phone (placeholder, default_value, default_country: ISO 3166-1 alpha-2 or ''); password (placeholder).
  • Stored: strings in meta under the field key. Email: a value is_email() accepts through sanitize_email; otherwise stored as plain text with an email warning (Enter a valid email address.). URL through sanitize_url after applying the prefix; a value containing whitespace, or one sanitize_url empties, is stored as plain text with a url warning (Enter a valid link.), unless wp_kses_bad_protocol() finds a scheme outside wp_allowed_protocols() in it (javascript:, data:, entity-encoded colons included), which stores '' with the same warning. Phone: (0) dropped, non-digits except + stripped, leading 00 → +; without +, default_country's national prefix (if present) is replaced by + and its calling code. The result must match ^\+[1-9][0-9]{6,14}$ (E.164); otherwise the value is stored as typed (plain text) with a phone warning, not rejected.
  • Length limits are warnings, not rejections, and count characters (Unicode code points), not bytes: ’, £, é and an emoji each count as one.
  • Password: never serialized to ability reads, dynamic data or page builders; containers with a password descendant are unwritable through the abilities as a whole.
  • All but textarea are compact for form columns; phone must stay width: full on narrow.

Documentation for the VX Framework.