Hi,
Please, use complete numbers in the equation’s returns, for example 0.50
In principle the equation is fine, but I will need the link to the page to check the form, because in the form published in the webpage: http://inetgoa.com/wp/?page_id=26, the fieldname3 does not correspond to a dropdown field.
Best regards.
Hi,
I’ve checked your form and neither of fields have assigned the class name: column3. Please, follow the steps below:
1. Go to your form’s settings.
2. Select the “Mailer Size” field, and enter the class name: column3 through the attribute: “Add Css Layout Keywords”
3. Select the “Quantity” field, and enter the class name: column3 through the attribute: “Add Css Layout Keywords”.
4. Select the “Unit Price” field, and enter the class name: column3 through the attribute: “Add Css Layout Keywords”.
and finally, save the form settings.
That’s all.
Best regards.
Hi,
Please, clear the browser’s cache, and visit your webpage again, the form is displaying fine, with the fields in the same row.
Best regards.
I did that but no unit price is showing up – that’s the problem, nothing is appearing in the calculated field, I need the price to show up?
Hi,
Please, look in the following link a screenshot of your page:
http://wordpress.dwbooster.com/customdownloads/2015-02-18/screenshot.png
Best regards.
I see it – there is no price shown in the calculated field – am I missing something? You should be able to pick the mailer size, then the quantity, and get the price in the calculated field.
Yeah, still can’t get any price to show which is the point. Any ideas? Thank you for your help!
Hi,
I’m sorry, I had misunderstood the question.
Javascript is a case sensitive language, and the value of options in the fieldname3 are: Standard, Medium, and Jumbo, but you are comparing the field with texts in lowercase. So, the correct equation would be:
(function(){
if(fieldname3=='Standard' && fieldname4==500)
return 0.50;
if(fieldname3=='Standard' && fieldname4==2500)
return 0.36;
if(fieldname3=='Medium' && fieldname4==500)
return 0.55;
if(fieldname3=='Medium' && fieldname4==2500)
return 0.41;
if(fieldname3=='Jumbo' && fieldname4==500)
return 0.60;
if(fieldname3=='Jumbo' && fieldname4==2500)
return 0.46;
})()
Best regards.
Works! Thank you so much! One more question – if I have a value like .60 it is showing up in the calculated field as .6 – I’d like that 0 after the 6 – can I stop it from cutting that off?
Hi,
In this case you should use the PREC operation, where the second parameter is the number of decimals:
return PREC(0.60,2);
The same will occur with 0.50
return PREC(0.50,2);
Best regards.
Hi,
In the corresponding return statements of previous equation. See the equation below:
(function(){
if(fieldname3=='Standard' && fieldname4==500)
return PREC(0.50,2);
if(fieldname3=='Standard' && fieldname4==2500)
return 0.36;
if(fieldname3=='Medium' && fieldname4==500)
return 0.55;
if(fieldname3=='Medium' && fieldname4==2500)
return 0.41;
if(fieldname3=='Jumbo' && fieldname4==500)
return PREC(0.60,2);
if(fieldname3=='Jumbo' && fieldname4==2500)
return 0.46;
})()
Best regards.