Short answer: To make a WordPress form field required only when another answer is selected, install the Conditional logic add-on for Easy Form Builder (Free Plus or Pro). Add a Fields rule: Preferred contact Is Phone, then Required, Phone number. The field stays optional for every other answer.
Quick facts
- Plan: Free Plus (up to 3 field rules per form, 2 conditions per rule) or Pro (no limit). Not available on the Free plan.
- Needs: the Conditional logic add-on and one question with fixed answers (Radio Button, Select or Check Box)
- Time: about 5 minutes
- Tested with: Easy Form Builder 4.3.1 on WordPress 7.1.4
- Last verified:
What a conditional required field is
A normal required field is required for everybody: the Required toggle in the field settings decides, and every visitor must fill the field in. A conditional required field depends on an earlier answer. In a contact form, the Phone number only matters when the visitor says they want a call back. If you make it required for everybody, people who prefer email leave the form or type a fake number.
With the Conditional logic add-on you keep the field optional and add a rule: if Preferred contact is Phone, then make Phone number required. Three THEN actions of the add-on change the required state of a field:
| THEN action | What it does | Use it when |
|---|---|---|
| Required | Makes the field required while the rule matches | A field is needed only for one answer (this guide) |
| Optional | Makes a field optional while the rule matches, even if its own Required toggle is on | A field is needed for most answers but not for one |
| Hide Field / Show Field | A field hidden by a rule is not checked, in the browser or on the server | A field should not even be visible for some answers |
For the plain Required toggle and custom required messages, see how to make form fields required or optional. This guide covers the rule-based version; the add-on as a whole is described in the Conditional Logic complete guide.
Before you start
- Your site is on Free Plus or Pro. On the Free plan, the Conditional logic window shows an upgrade notice instead of the rule builder.
- The Conditional logic add-on is installed (Easy Form Builder » Add-ons). It adds a Conditional logic button to Form Settings.
- You have a form with a question that has fixed answers, or you build one in Step 1. New to the plugin? Start with creating your first form.
Step 1: Build the form with the deciding question
The rule reads an earlier answer, so the form needs a question with fixed choices. Our example is a contact form with three fields:
- Preferred contact: a Radio Button field with the options Email and Phone
- Phone number: a Text field, with Required switched off
- Email address: an Email field, also optional in this example
To build it, go to Easy Form Builder » Create and choose New Form. Click the tiles Radio Button, Text and Email, in this order. Then click the gear icon of each field to set its label, and of the Radio Button field to rename its two options.

The image shows (1) the answer that decides and (2) the field that will become required. Leave Required off on field 2: the rule switches it on.
Step 2: Open Conditional logic
- Click Form Settings at the top of the builder.
- Scroll down the panel and click (1) Conditional logic.

- The window opens on the (1) Fields tab. Rules that show, hide or require fields live here.
- Click (2) Add to start a new rule.

Step 3: Create the Required rule
- Under IF, (1) leave the first box on Field, choose Preferred contact in Select Field, keep Is and choose Phone as the value.
- Under THEN, (2) change Show Field to Required and choose Phone number in the second box.
- Click (3) Save.

The window returns to the rule list, and the card sums up the rule as Preferred contact Is “Phone” ⟹ Required → Phone number. The switch on the card pauses the rule without deleting it.

Close the window with the X in its corner and click Save in the builder. Copy the shortcode from the dialog and add it to a page; see how to embed a form in WordPress if you need help with that.
Step 4: Test both answers on the page
- Open the page in a private window and choose (1) Phone. Leave Phone number empty.
- Click Submit. The empty Phone number field now shows This field is required., and a bar at the bottom says “Please fill in all required fields”.
- Type a number and click Submit again: the form is sent.
- Reload the page, choose Email and click Submit with Phone number empty: the form is sent as well.



That is the whole behavior: the same field is required for one answer and optional for the other. If the visitor changes the answer, the field follows it, because the rule is checked again after every change.
The rule works in the browser and on the server. In our test we removed the Phone number from the request after choosing Phone, as a script could do. The server refused it with “Please enter valid value for the Phone number field.” With Email chosen, the same request without Phone number was accepted.
Show visitors that the field is required
A field that is required by a rule does not get the red asterisk (*) that the Required toggle adds. In our test, the label of Phone number stayed plain after we chose Phone, and visitors only learned about the rule from the message after Submit. To warn them earlier, give the same rule a second action that changes the label:
- Open the rule and click Add under THEN.
- (2) Choose Set label, then Phone number, and type Phone number * in the text box.
- Save the rule.

While Phone is chosen, the label reads Phone number *; with Email it goes back to Phone number.

The same trick works with the Set placeholder or Set help text actions. For general placeholder tips, see placeholder text examples.
Make a required field optional for one answer
The reverse also works. Switch Required on in the field settings of Phone number, so the field is required by default and shows the red asterisk. Then add the rule Preferred contact Is Email with the THEN action Optional and the target Phone number.

We tested it: with Email chosen the asterisk disappears and the form is sent with the field empty. With Phone chosen, or with no answer chosen yet, the field stays required. Use this version when most visitors must fill the field in and only one answer is the exception.
Plan and limits
- Free: no Conditional logic window. The add-on shows an upgrade notice, and the plain Required toggle keeps working.
- Free Plus: up to 3 rules on the Fields tab, 2 conditions per rule, and as many THEN actions per rule as you need. Required, Optional, Show Field and Hide Field are all available.
- Pro: no rule limit, and the extra controls marked with a diamond icon: NOT, Add Group, Priority and Stop after this rule matches.
Free Plus limits come from the add-on code and the builder, which we used on Free Plus. We could not test Pro, because there is no Pro licence on our test site.
Troubleshooting
- The field is not required when the answer matches. Check that the rule’s switch is on and that the value in the IF row is the option the visitor picks. Then save the rule and the form again.
- There is no red asterisk. That is expected for a field required only by a rule. Add a Set label action as shown above, or switch the Required toggle on and use the Optional action instead.
- “This field is required.” stays on screen after the visitor changes the answer. In our test, a message that was already shown stayed until the next click on Submit, but the field was optional again and the form was sent.
- “Please complete the form.” appears on Submit. The whole form is empty. Choose an answer or fill in a field first.
- No Conditional logic button in Form Settings. The add-on is not installed, or the site is on the Free plan.
- The Add button shows a diamond icon. The form already has 3 field rules, the Free Plus limit. Put several actions into one rule, or upgrade to Pro.
Frequently asked questions
How do I make a WordPress form field required only if another field has a certain answer?
Install the Conditional logic add-on for Easy Form Builder, open Form Settings, Conditional logic, Fields, and add a rule: IF the deciding field Is the answer, THEN Required for the field you want. Leave the field optional in its own settings.
Is a conditional required field free in Easy Form Builder?
It is not in the Free plan. Free Plus, which costs nothing, allows 3 field rules with up to 2 conditions each, and Required and Optional are both included. Pro has no limit.
Can I require a field when another field is empty or filled in?
Yes in principle: for text fields the IF row offers Is, Is not, Contains, Not contain, starts with, ends with, Empty and Not empty, so a rule can react to a field being left empty or filled in. We built and tested the Is operator on a Radio Button field in this guide.
Is a field that is hidden by a rule still required?
No. In our test, a required field that a Show Field rule keeps hidden did not block the form, in the browser or on the server. It becomes required as soon as the rule shows it.
Does the rule also work when someone skips the browser check?
Yes. The server applies the same rules before it accepts the submission, and in our test it refused a request that left out the required field.
Why does the label show no asterisk for a rule-required field?
Easy Form Builder adds the red asterisk only for fields whose own Required toggle is on. A rule changes the check, not the label. Use a Set label action to add an asterisk or a note.
What’s next
- Create your first form with Easy Form Builder
- Make form fields required or optional
- Conditional Logic complete guide: fields, emails, confirmation and webhooks
- Skip or jump steps in a multi-step form
- Send form emails to different teams by answer
Updated for Easy Form Builder 4.3.1 on , tested on the Free Plus plan with the Conditional logic add-on; Pro limits are taken from the plugin code.