CalcBuilder Forum

Yes/No checked

User joel 2015-11-01 23:44:23

Hi
my Question is how can i set a YES/NO box as default checked.

Moonsoft support 2015-11-02 17:50:01

Hi,
for setting checkboxes checked by default, you can use the javascript tab to set the check as soon as the form loads. You only need to add this code:


CB("input").attr("checked","checked");

at the first js tab of your calculator ('executed on loaded page'). You only need to replace XXX with the variable name you have entered for your field.


Hope this helps, regards

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development

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

Buy now!