Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

FormsField Types
Virtual Field

Virtual Field

Virtual field in the form builder

The Virtual Field stores values server-side only and never renders any HTML on the front end of your form. Unlike hidden fields or read-only fields, the data is completely invisible to users and cannot be viewed or edited through browser DevTools. Use Virtual Fields to securely store default values, calculations, and lookup data that must remain protected from manipulation.

— Premium Feature —

This field is available on the Basic, Plus, Business, and Elite licenses.

How to add a Virtual Field

To add a Virtual Field to your form:

  1. Go to Formidable → Forms and click the name of your form to open the form builder.
  2. Click the Add Fields tab on the left sidebar.
  3. Scroll down to the Advanced Fields section or type "virtual" in the search box.
  4. Click Virtual to add it to your form.
Virtual field in the Add Fields search results

The field will appear in the form builder with a disabled textbox and a message: "Virtual fields will not show in your form." This is expected behavior. The field only processes and stores data on the server when the form is submitted.

Next, set the options for the field.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Field options

Click the field in the form builder to open its options. Default Value, Calculate Value, Lookup, and Field Key are in the Advanced section. Click Advanced to expand it.

A Virtual Field has the following options:

  • Field Label: Used to identify the field in the admin entry list, email notifications, and Views.
  • Format: Set the format for the stored value (such as None, Number, or Currency).
  • Default Value: Set a static value or use shortcodes to populate the field dynamically.
  • Calculate Value: Build a server-side calculation based on other fields in the form.
  • Lookup: Pull a value from entries in another form.
  • Field Key: A unique identifier for referencing this field in shortcodes and custom code.
  • Payment Status: Change the field when the status of a payment changes. Learn how to update the field when a payment status changes.
Virtual Field options with the Advanced section expanded and the Payment Status section below

The next section explains how the field gets its value.

How it works

The Virtual Field has 3 ways to set its value. All processing happens on the server during form validation. Values are never exposed in the browser.

Default value

Set a static value or use dynamic default value shortcodes. Common examples include:

  • Securely store the logged-in user's ID:
    [user_id]

  • Capture a URL parameter without exposing it in a hidden field:
    [get param=source]

  • A fixed value like a discount percentage or internal reference code.

The default value is set when the entry is created. When the entry is edited later, a Virtual field with no calculation or Lookup keeps the value it has. This includes a value set after submission, such as a payment status.

A calculation or a Lookup runs again each time the entry is updated. Its result replaces the saved value.

Calculate value

Use field calculations to compute a value based on other fields in the form. The calculation runs on the server during form validation. The result is never visible in the browser. This is useful for computing totals, scores, or derived values that must stay hidden.

Lookup

Use the Lookup option to pull a value from entries in another form. For example, you can look up a student's grade level based on their student ID or retrieve a customer's account balance from a separate data form.

Next, learn how to change the field when a payment is completed or refunded.

Update the field when a payment status changes

Use the Payment Status section of a Virtual field to save a value in the field when the status of a payment changes. For example, give the field the default value Unpaid. It then shows Unpaid until the payment is completed. After that it shows Paid, and Refunded when you refund the payment in Formidable.

Buyers can't see or change the value on the form. The Known limitations list the refund and Repeater cases.

This works with the Collect a Payment action for Stripe, Square, and PayPal Commerce. Add the payment action to the form first. Until the form has one, the section only shows a link to the form actions.

Go to Settings → Actions & Notifications in the form builder. Click Stripe, Square, or PayPal Commerce. The new action is named Collect a Payment. Set its Amount, for example to the shortcode of a Total field. Then click Update.

  1. In the form builder, click the Virtual field to open its field options.
  2. Click Payment Status to expand the section.
  3. If the form has more than 1 payment action, choose one in the Payment Action dropdown, or choose All payment actions. When you save with All payment actions, the rows replace this field's rows in every payment action of the form.
  4. If the section has no rows, click Add. Then fill in the new row:
    • Payment Status: Choose Completed, Failed, Refunded, Canceled, or Canceled and Expired. Canceled and Canceled and Expired are for subscriptions. Canceled is used when the subscription is set to end later, for example after a cancel request or when it reaches its payment limit. Canceled and Expired is used when the subscription stops. This happens when it is canceled, after more than 3 failed payments, or when PayPal suspends it.
    • Value: Type the value to save in the field, such as Paid.
  5. To add another row, click the + icon at the end of a row. To remove a row, click the − icon.
    Virtual Field - Payment Status section with Completed and Refunded rows
  6. Click Update to save the form.

When a payment reaches a status that has a row, Formidable saves the row's value in the Virtual field. A status with no row doesn't change the field. To check the saved value, open the entry on the admin Entries page.

To refund a payment in Formidable, go to Formidable → Payments and open the payment. Click Refund. Then click Confirm.

When a PayPal Commerce one-time payment fails during checkout, the form shows an error and Formidable doesn't keep the entry. So the Failed value isn't saved in that case.

The rows are saved in the After Payment setting of the payment action. The same rows also show in the action under Settings → Actions & Notifications. A change in one place shows in the other.

Learn more about how to save the PayPal Commerce payment status in a field.

Next, see what else a Virtual Field is good for.

Use cases

Protect pricing from manipulation

Store product prices or discount percentages as a Virtual Field so users cannot inspect or edit the values through browser DevTools. A regular hidden field renders as an <input type="hidden"> in the HTML source and can be changed by anyone with basic browser knowledge.

Store the logged-in user ID securely

Capture who submitted the form by setting

[user_id]

as the default value. Unlike a User ID field or hidden field, the Virtual Field value cannot be spoofed by modifying the HTML.

Internal scoring or grading

Build a calculation that assigns a score based on form responses. For example, a quiz form can calculate the total correct answers in a Virtual Field without revealing the answer key or scoring formula to the person filling out the form.

Auto-populate account data via lookup

Use the Lookup option to pull related records from another form. A school enrollment form can look up the student's advisor name, or an order form can retrieve the customer's shipping address from a contacts form.

Tax or commission calculations

Compute tax amounts or sales commissions on the server based on form inputs. The formula and intermediate values stay hidden. The final value is stored with the entry for use in emails, Views, or exports.

Secure role-based routing

Store a value that drives email routing or redirect logic in your form actions. The value is not in the front-end HTML. Users cannot manipulate it to change which email is sent or where the form redirects after submission.

After the field stores a value, you can show it in messages and Views.

Display Virtual Field values

Display the value stored in a Virtual Field in a form's confirmation message, email notification, or View.

Shortcode options

  • Display value: Show the stored value. Replace x with the ID or key of the Virtual Field.
    [x]

Virtual Field values are included in the

[default-message]

shortcode. They appear automatically in email notifications that use the default message content.

The next section lists every place the stored data appears.

Where Virtual Field data appears

  • Admin Entries page: The value appears on the View and Edit Entry pages. On the Edit Entry page, it is displayed in a disabled box and cannot be edited.
  • Email notifications: The value is included in
    [default-message]

    and can be referenced with the field's shortcode.


  • Views: Use the field shortcode to display the value in any View.
  • CSV exports: The field is included as a column when you export entries to CSV.
  • Formidable API: The value is accessible through the Formidable Forms API like any other saved field.

To choose the right field type, compare the Virtual Field with the Hidden and Read Only fields.

Virtual Field vs Hidden Field vs Read Only

Use the table below to decide which field type fits your needs.

FeatureVirtual FieldHidden FieldRead Only
Visible in HTML sourceNoYesYes
Users can manipulate via DevToolsNoYesYes
Shows on the formNoNoYes (disabled input)
Supports front-end conditional logicNoYesYes
Saves data to entriesYesYesYes
Available in emails and ViewsYesYesYes
Editable on admin entry pageNo (read-only)YesYes

When to use a Virtual Field: Choose this when the stored value must not be visible or editable on the front end, such as pricing data, internal scores, or secure user identifiers.

When to use a Hidden Field: Choose this when you need a non-visible field that can still participate in front-end conditional logic or be prefilled via URL parameters.

When to use Read Only: Choose this when you want the user to see the value on the form but not change it, such as displaying a calculated total before submission.

Next, review what a Virtual Field cannot do.

Known limitations

  • Virtual Fields cannot be used as a trigger in field conditional logic because there is no front-end element to evaluate. They can still be used as conditions in email and other form action settings, since those run on the server.
  • The value cannot be edited on the admin Edit Entry page. It is always displayed in a disabled box.
  • Front-end CSS and layout classes do not apply since the field does not render any HTML on the form.
  • Virtual Fields do not render on the front end. So these settings are not available: Required, Label Position, CSS Layout Classes, Field Size, Unique, Read Only, Visibility, Conditional Logic, and Description.
  • A Virtual Field inside a Repeater has no Payment Status section.
  • A partial refund in Stripe and a refund made in the Square dashboard don't change a Virtual Field's payment status value.
  • Don't use a Virtual Field in the Amount of a Stripe or PayPal Commerce payment action. These gateways get the amount from the values on the form before it is submitted. A Virtual Field has no value at that time. Use a Total field for the payment amount.
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms