Are you looking to show or hide form fields based on what your visitors select? Conditional Logic lets your form react to the answers people give, so visitors only see the fields that are relevant to them.
With the Form block from Nexter Blocks, you can easily add conditional logic to your WordPress form.
To check the complete feature overview documentation of the Nexter Blocks Form block, click here.
Requirement – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.
For this, your form must already have a Radio Button or a Checkbox field, because a condition needs a fixed set of options to compare against.
Add the Field That Controls the Condition
Add the Form block to the page and select the appropriate form type, then follow the steps –
1. Add the required form fields and customize them as per your requirements.
2. Add a Radio Button or a Checkbox field. This is the field your condition will check.
3. Add the options a visitor can choose from. For each option, the first field is the label name and the second field is the value.
Note: Only the Radio Button and Checkbox fields can control a condition. Other field types cannot be used as the source.
Set the Condition on the Field You Want to Show or Hide
Now select the field you want to show or hide, then follow the steps –
1. Open the Conditional Logic panel in the block settings.
2. Enable the Enable toggle.
3. From the Field dropdown, select the Radio Button or Checkbox field you want the condition to check.
4. From the Condition dropdown, select how the answer should be compared.
5. From the Value dropdown, select the option you want to compare against.
6. From the Then dropdown, select Show this field or Hide this field.

Available Conditions
The conditions you can choose depend on the field you selected –
- Radio Button – is, is not, is empty, and is not empty.
- Checkbox – contains, does not contain, is empty, and is not empty.
A Checkbox uses contains because a visitor can select more than one option at a time.
Note: The Value dropdown is not needed when the condition is set to is empty or is not empty.
Fields That Support Conditional Logic
You can add a condition to the following fields –
- Name Field
- Email Address
- Phone Number
- Number Field
- URL Field
- Date Field
- Time Field
- Message Field
- Dropdown
- Radio Button
- Checkbox
- Acceptance Field
- Submit Button
The Hidden Field and the Security Code field do not support conditional logic.
Good To Know
- When a field is hidden, its value is cleared and it stops being required. So a hidden field can never block the form from submitting, and it is not included in the email you receive.
- Values are matched without case sensitivity.
- Conditional logic keeps working across steps in a multi step form.
- You can set a condition on the Submit Button as well, so the form can only be submitted once a visitor gives a particular answer.
Now your form will show and hide fields based on what your visitors select.










