change the background color of Table

[ad_1]

Hello @msedighiyan86

Thank you very much for using our plugin. I’ll assume you are referring to the tables on your form into the DIV tag with class name “table-1”.

Assuming the radio buttons field is the fieldname33, you can insert a calculated field in the form as an auxiliary (you can hide it by ticking a checkbox in its settings), and enter the equation:


(function(){
    let background = '';
    switch(fieldname33){
        case 1: background = 'red'; break;
        case 2: background = 'blue'; break;
        case 3: background = 'url("https://www.yourwebsite.com/path/image1.png")'; 
        break;
    }

    jQuery('.table-1 table').css('background', background);
})()

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