lundi 6 janvier 2020

How can one set checkboxes via JavaScript in Nintex Forms?

I have 2 choice checkboxes: Invest and Non-Invest.

Checkbox

In my NintexForm I assigned varPosType to the checkboxes.

I can get their values through 

console.log("varPosType is:" + (NWF$("#" + varPosType + ' input:checked').val() == 'Invest'));
console.log("varPosType is " + (NWF$("#" + varPosType + ' input:checked').val() == 'Non-Invest'));

They either return true or false.

The problem I have is that I don't know how to set them to "Invest" or "Non-Invest" via JavaScript (without the user clicking onto the checkbox)

I tried lots of different stuff to check the checkboxes, but none of them worked. Does someone know a solution to this?




Aucun commentaire:

Enregistrer un commentaire