WPForms Documentation

Documentation, Reference Materials and Tutorials for WPForms

How to Set Dynamic Field Default Values in WPForms

WPForms makes it easy to include fields based upon post-types or taxonomy. In this article, we will show you how to create dynamic field choices.

We are assuming that you have already installed WPForms on your WordPress site and have also created the form you want to include dynamic fields on.

Dynamic fields can connect form entries and allow users to make selections from existing content.  Included in dynamic fields are dropdowns, checkboxes, and multiple choice  buttons.  These may be populated with posts, pages, custom post types or with categories and tags.

Setting Dynamic Field Default Values

Go to your form fields.  Add a dropdown, multiple, or checkbox choice field and then click on it in the preview panel at right.

How to Create Dynamic Form Choices

In the Field Options panel at left, under Advanced Options, select the Dynamic Choice option.  At this time, you can choose between a Post Type (Posts, Pages, or Custom Post Types) and Taxonomy (Categories or Tags).

In our example, we have chosen the Custom Post Type of Products.  When you view this form, all published products will be viewable.  Users can select which item they are referring to in their form inquiry.

Products Dynamic Dropdown
Finally you’re all set. You’ve create a form with dynamic fields auto-populated with data from existing content within your website.