Conditional radio button | WordPress.org

[ad_1]

Hello, can you please help me with this? I’ve added a radio button field (fieldname33) with 2 fields 1 and 2, and I want to calculate 3% if field 1 is selected, and 1% if field 2 is selected.

This 1st part is good, (worked for previous calculation)

(function(){
var v = fieldname2*((fieldname16 == 'Euro') ? curs : 1);

but I don’t know how to write this 2nd part

if(fieldname33 == '1')*.03, 0);
if(fieldname33 == '2')*.01, 0);

and put both parts together. 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