Skip to content

Where fields appear ​

Who sees VX fields ​

VX fields appear for everyone WordPress lets edit the entry they belong to, with the same roles that can edit its title and content:

  • Posts: anyone who can edit that post. By default an Editor sees the fields on every post, an Author on their own posts, and a Contributor on their own drafts. On Add New, anyone who can create that kind of post.
  • Terms: anyone who can edit terms in that taxonomy, by default Editors and administrators. That includes the Add New form.
  • User profiles: anyone who can edit or create users, by default administrators, on Edit User and Add New User. Users on their own Profile screen only get the fieldsets that let them, as described below.

Then each fieldset's Locations decide which of those people get it. Add a Viewer role or Viewer capability condition to keep a fieldset for some of them. For example, show an "Editorial notes" fieldset only to Editors and administrators, and Authors won't see it on their own posts. A fieldset someone doesn't see isn't saved when they save the post, term or profile.

Fieldsets on users start with administrators. A User location with no Viewer role or Viewer capability condition is filled in only by administrators, on every profile, including their own. That keeps fields such as an account status or a credit balance away from the member they describe. To let users fill in a fieldset on their own profile, add a Viewer condition that includes them: Viewer role is Subscriber, for example, or Viewer capability read for every signed-in user.

Building fieldsets, in the VX dashboard, stays limited to administrators.

Option pages are different: each page has its own Capability, so you can let Editors update an option page without making them administrators. See Creating an option page.

Comment fields appear on WordPress's Edit Comment screen for anyone who can edit the comment, and a Comment Type location with no Viewer condition is filled in only by moderators. See Using comment fields.

In the block editor ​

A VX button in the editor's top bar, next to Options, opens the VX panel on the right side of the screen. Every fieldset that applies to the post is in it.

  • The panel's starting width comes from the post type's Default Sidebar width (Default, Medium or Wide). In the panel's menu you can change the width and choose whether it opens by default, for that post type.
  • Values are written to the post as you type, so blocks bound to them with dynamic tags update in the preview straight away.
  • WordPress's own Save and Publish buttons save the fields. The panel doesn't need to be open.
  • WordPress's pre-publish checks use the same side of the screen, so the VX panel closes while they're open.

If a fieldset has a Taxonomy field set to edit terms inside VX, WordPress's own panel for that taxonomy is hidden, so there's one place to choose terms.

In the classic editor ​

When a post type uses the classic editor, the same form appears in a Fieldsets box below the content. Dynamic tags, data loops and visibility rules are block editor features, so they aren't available there.

On terms ​

Fields appear on both the Add New form and the term's edit screen.

When you add a term, WordPress creates it first and VX saves the fields right after. If the fields can't be saved, the term still exists. A notice explains what happened and links to the term's edit screen so you can finish there.

On user profiles ​

Fields appear on Profile, Edit User and Add New User.

On Add New User, only the fieldsets that apply to the selected Role are shown. Switching roles updates the form; anything you already typed is kept if you switch back. Only the fieldsets that match the role you submit are saved.

On option pages ​

The option page shows its fieldsets as a form with its own Save button. Nothing is saved until you click it.

Fields that aren't there ​

If a field you expect isn't showing, check the fieldset is active and its Locations match, that the field isn't hidden by conditional logic, and that you're signed in as someone who can edit this entry and whom the fieldset's Viewer role and Viewer capability conditions include.

Technical details for LLMs
  • User locations without a viewer condition: a user group with no viewer_role / viewer_capability condition in effect admits only manage_options users wherever the field editor decides (the user screens, their saves, the editor routes, media-modal uploads). Value reads and get_fieldset_values() / save_fieldset_values() are unaffected.
  • Dictionary entries for the field editor and REST API writes (vx on /wp/v2/users/…) follow the same rule. See Writing values.
  • Capability: the post editor (block + classic) loads for edit_post on the post, or the post type's create_posts on Add New; the term screens for edit_term, or the taxonomy's edit_terms on Add Term; the user screens for edit_user (every user has it for themselves), or create_users on Add New User. Location conditions, viewer ones included, then pick the fieldsets. The classic, term and user saves check the same capability and skip a fieldset whose Location doesn't match the current user.
  • Editor REST routes (vx-framework/v1): fieldsets/{key}/values/{id} (GET, PUT), fieldsets/values/{id}, fieldsets/{key}/validate/{id}, fieldsets/{key}/sources/{field_key} (+ /terms), fieldsets/attachments, fieldsets/references and fieldsets/{key}/files/upload/{id} check that capability for the object the request names: entity_id (context_id for sources), with object=taxonomy|user for a term or user. With no id (an Add New screen), the user must be able to create an object the named fieldsets attach to, and their Viewer conditions must admit the user. A deactivated fieldset is refused, and the batch read leaves it out and reports errors only for the keys it was asked for. Reference details are looked up only through fieldsets the user edits on that object. The fieldset builder's own option lookups, which name no object, need manage_options. Uploads also need upload_files, and attach the file to the entity only when it is a post. Values, validation and sources refuse a fieldset whose Location doesn't match the current user (not_assigned, or 403 for sources). Attachment details are returned only for attachments the user may read, non-private ones to a user with upload_files, or ones attached to the post being edited. Every other vx-framework/v1/fieldsets route needs manage_options.
  • Dictionary entries: a choice field's dictionary and the Phone field's country list are read through routes that make the same check for the fieldset the request names. See Dictionaries.
  • Post types: any registered post type with at least one active matching fieldset gets the panel. VX doesn't need to manage the post type.
  • Block editor: values sync to post meta through the editor store as they change; WordPress's save persists them. Empty values aren't written as meta rows on save.
  • WordPress REST API: the field meta is registered for context=edit only, which WordPress serves to users who can edit the post. A visitor's /wp/v2/<type>/<id> response carries no field values. Filter vxframework/fieldsets/meta_rest_contexts to change the contexts. Writes and context=edit reads skip a field key unless a fieldset holding it admits the user by its viewer conditions (see Locations).
  • Taxonomy field with backend_edit_mode: "custom_field" hides the native taxonomy panel; native_metabox keeps WordPress's box and leaves the field out of the VX form; a save that doesn't send the field leaves its terms alone.
  • Add New User: fieldsets are filtered by the chosen role through the user_role Location condition.
  • Read or write the same values without a screen: vx-framework/get-post-values / vx-framework/set-post-values, vx-framework/get-term-values / vx-framework/set-term-values, vx-framework/get-user-values / vx-framework/set-user-values.

Documentation for the VX Framework.