cancel
Showing results for 
Search instead for 
Did you mean: 

Check Box Validation in Offline Form

Former Member
0 Kudos

Dear Experts,

I have a requirement in an offline form where I have six check boxes, and out of the six check boxes

user can only select any three.

Request you to please suggest how to achieve this.

Warm Regrads,

Upendra Agrawal

Accepted Solutions (1)

Accepted Solutions (1)

former_member389677
Active Participant
0 Kudos

Hi Upendra ,

I think you can write the validation code in the exit event of each check box. Inside the exit event write a code to count the number of checks. if it is greater than 3 then clear the check box and give the error message.

Regards

Shaira.

Former Member
0 Kudos

Thank you Shaira for your suggestion.

I will try it, and get back to your.

Warm Regards,

Upendra Agrawal

Former Member
0 Kudos

Dear Shaira,

How can I declare a global variable in FormCalc ?

Request you to please suggest.

Warm regards,

Upendra agrawal

former_member389677
Active Participant
0 Kudos

Hi Upendra,

Declare variables via---

Edit->Form Properties->Variables(tab)

You can add variables there.

Thanks,

Shaira.

Former Member
0 Kudos

Thank you Shaira.

I am able to get the count of the selected checkboxes.

Request you to please suggest how may I display the error message?

Your help is highly appreciated.

Warm regards,

Upendra Agrawal

former_member389677
Active Participant
0 Kudos

Hi Upendra,

xfa.host.messageBox(" You cannot check more than 3 fields.");

Thanks and Regards,

Shaira.

Former Member
0 Kudos

Thanks a ton Shaira.

Full points to you

Just wondering what is the "Validation Script Message" for each UI.

warm regards,

Upendra Agrawal

Answers (0)