Define dependencies | WordPress.org

[ad_1]

Hello @civilvicky

I’ll try to describe the process with a hypothetical example.

Assuming the calculated field is the fieldname123, and has the equation fieldname1+fieldname2, and the field to show/hide is the fieldname456.

You can edit the equation as follows:

(function(){
let result = fieldname1+fieldname2;

if(result < 1) {
    ACTIVATEFIELD(fieldname456|n);
    HIDEFIELD(fieldname123|n);
} else {
    IGNOREFIELD(fieldname456|n);
    SHOWFIELD(fieldname123|n);
}

return result;
})()

Note I used the ACTIVATEFIELD/IGNOREFIELD operations with the third-party field, and HIDEFIELD/SHOWFIELD with the calculated field to avoid endless loops.

Best regards.

 

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