CalcBuilder Forum

yes/no box

Usuario moon_1817 2014-09-22 22:56:32

Hi there!

How to use yes/no box?
- what is there default value? (Y?)
- how to use this value?
=> Example: if the customer is from EU and outside from my country and has VAT code, then we don't need to add local tax. So how to use this "if" / "else" commands?

With kind regards
Gunnar

Moonsoft support 2014-09-23 11:06:43

Hi,

Yes/no checkbox send Y as value when checked, otherwise send empty value. So you could test in code like this:

if ($CHECKBOXINNERNAME=='Y'){
// WRITE CODE TO YES
} else {
// CODE TO NO
}

Regards,

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!