Expand my Community achievements bar.

SOLVED

Cannot set a checkbox to required ("User Entered - Required")

Avatar

Level 5

It seems like the option to set checkboxes to "required" is not available in my LiveCycle form.  The Object/Value tab only gives me the "User Entered" option (in addition to "Calculated", "Protected", etc.).

Is this always the case?  Does this have to be done through Javascript?

1 Accepted Solution

Avatar

Correct answer by
Level 5

Thanks for the reply.  What I realized later is that I need the form to check if one of two check boxes is marked prior to clicking a Submit button in one section that comes later.  So I don't want the form to make the check boxes required because the first user does not need to check them.  So I put this in the script for the Submit button:

if (CheckBox1.rawValue == 0 && CheckBox1.rawValue == 0)

  {

  xfa.host.messageBox("Please select Approved or Not Approved before clicking Submit!");

  }

View solution in original post

4 Replies

Avatar

Level 2

from what I know checkboxes must be set to mandatory by javascript.

this.mandatory = (this.rawValue == null) ? "error" : "enabled"

Avatar

Level 10

Hi there,

if you want a checkbox to be set mandatory in your form, just replace it by 1 radio button and change its appearance to a square box, so it looks like a check box...

then just make sure to be able to uncheck the radio button would be possible and then you can set the field to required

hope this help

Avatar

Correct answer by
Level 5

Thanks for the reply.  What I realized later is that I need the form to check if one of two check boxes is marked prior to clicking a Submit button in one section that comes later.  So I don't want the form to make the check boxes required because the first user does not need to check them.  So I put this in the script for the Submit button:

if (CheckBox1.rawValue == 0 && CheckBox1.rawValue == 0)

  {

  xfa.host.messageBox("Please select Approved or Not Approved before clicking Submit!");

  }

Avatar

Level 5

Thanks for the reply, please see my latest comment below.