How to validate the checkbox?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi! use this command to collect the value of the check and then validate based on your needs:

alert("Selected Keys and Values are::"+frmTest.checkboxMine.selectedKeyValues);

If you want to validate the checkbox on the current form you are on, you can make a small modification to Ismael's code as follows:

currentForm = kony.application.getCurrentForm();

alert("Selected Keys and Values are::"+currentForm.mycheck.selectedKeyValues);

I always like this method if I am referencing the form I'm on. In most cases that is exactly what you are doing. The good part here is that you can change the name of your form and the getCurrentForm() method will still retrieve the form you want. This minimizes refactoring code if you change the form name.