Radio button field | WordPress.org

[ad_1]

Hello @psiim18

If you configure some fields depending on the choices in the radio buttons field, those fields will be visible only if the choice is ticked.
If you want to show some fields only if there is no choice ticked in the radio buttons fields, you must use a calculated field as an auxiliary.

I’ll try to describe the process with a hypothetical example. Assuming you have the radio buttons field fieldname1, and you want to activate the fieldname2 and fieldname3 fields only if there is no choice ticked in the radio buttons field.

Insert a calculated field in the form you will use as an auxiliary (You can hide it by ticking a checkbox in its settings), and enter the following equation:

(function(){
  if(NOT(fieldname1)){]
    ACTIVATEFIELD(fieldname2|n);
    ACTIVATEFIELD(fieldname3|n);
  } else {
    IGNOREFIELD(fieldname2|n);
    IGNOREFIELD(fieldname3|n);
  }
})()

Note I used the “|n” modifier with the fieldname2 and fieldname3. The plugin replaces the fields’ names with their values before evaluating the equations. The “|n” modifier tells the plugin you are referring to the field’s name, not its value.

Best regards.

Hello,

I don’t understand, I have fields selected, what to display, but it also shows other fields.

https://prnt.sc/jV6zIlqrfqqm

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer