Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Geckoz100
Level 5
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
Geckoz100
Correct answer by
Level 5
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
pauly225
Level 2
Level 2

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

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

Magus069
Level 10
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

Geckoz100
Correct answer by
Level 5
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

Geckoz100
Level 5
Level 5

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