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
BedrockMission!

Learn more

View all

Sign in to view all badges

Why do I get a message saying "____ cannot be left blank" error message upon opening a form?

Geckoz100
Level 5
Level 5

On several forms I have made I get this annoying message every time I open them, saying, "____ cannot be left blank" for several fields. The only way I have found to eliminate that is to disable error messages by going into Properties > Form Validation > Show Dialog Message and select "Don't show any message boxes at all".  Can anyone shed light on this?  Thanks.

2015-11-27_13-55-01.jpg

10 Replies
Geckoz100
Level 5
Level 5

I'm still hoping someone out there will see this that can help.....

petergas1
Level 2
Level 2

Because those fields are of type "User Entered - Required".    (And a validation check is apparently triggered when you open a form?)

radzmar
Level 10
Level 10

This may be caused by executing the exit event of those fields through a script.

Geckoz100
Level 5
Level 5

Thanks for the responses.  Could this situation be caused by having an "execValidate" line in the layout:ready event of some of the objects?  For example, I have a very long form with a Submit button that turns green when all the information is provided.  So once the whole form validates, the user can see the green button and know that the form is ready to submit.  So in this form, have Form Validation set to "Don't show any messages boxes at all" because if I don't I get a dialog box saying that 30 fields or so are required.  Is there perhaps a better way to run the execValidate script?  Thanks for any help.

radzmar
Level 10
Level 10

The layout:ready event is the wrong place for such action. Use the preSubmit event instead.

Geckoz100
Level 5
Level 5

That's what I was afraid of.  I would like the button to turn green as soon as the required fields are completed -- is there any other way to achieve that effect?

petergas1
Level 2
Level 2

You could of course do this manually, testing each field for completion and validity.   

btw, just yesterday I was trying to turn the validation 'off' temporarily so I could silently test just your situation.   However it seems that is not possible as this is a read only attribute of the form.

Geckoz100
Level 5
Level 5

Thanks for the suggestion, but doing it manually is not really an option since there are about 60-70 fields to check.  It's a very complicated form (government, of course).  I don't want to have to chase down every single modification to fields and keep track of it in my validation script.  I'm not sure what you meant by your last comment about "read-only attribute".  Any other ideas on how I could make the Submit button change color as soon as everything is complete?

Geckoz100
Level 5
Level 5

I decided to put my validation script in the mouseEnter event of the Submit button.  If the form validates, the button turns green.  It's not a real-time validation like it was with the script in the layout:ready event, but it's a close second.  In any case, it does improve the performance and usability of the form, because I noticed that it was slowing down the keyboard a little with the original setup because it was constantly validating.  Now there's no delay.