Calculate field change background dynamically

[ad_1]

Hello,

I would like to ask how I can dynamically change the background of a calculated field with a button?

I have tried the following, but it does not work.

  • my calculated field is number 4
  • in my button under OnClick event I put the following:
    getField(4).jQueryRef().removeClass(‘red green orange’).addClass(‘green’);

My Button is also for the calculate for the form.

in my CSS is the following:

#fbuilder .red .cff-calculated-field input{background-color:#fccbc8 !important;}
#fbuilder .green .cff-calculated-field input{background-color:#90ee90 !important;}
#fbuilder .orange .cff-calculated-field input{background-color:#f6d77a !important;}

Where is the error?

Thank you.

 

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