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

Text or Numeric fields will not display message when left empty- Required user input not working

Level 1
Level 1

I've been tearing my hair (what's left) out on this one, I cannot get any text fields or fields with numerical info to be set as "required". Someone can tab right past them without entering the information, or print the form with that field empty. I set the field to User Entered- Required under the value tab, and entered a empty message to be displayed if they leave it empty. I could not find an answer to this by doing a search. I did read something about using the exit command?, but could not follow the link to what appeared to be on this forum somewhere. I am using livecycle 8.0.

1 Reply
Level 7
Level 7


User Entered - Required seems to just put a highlight around the field, i think you still need some code if you want to force people to fill it in.

In the exit event of the Textfield put:

form1.#subform[0].TextField1::exit - (JavaScript, client)

//if the textfield is empty when exited, show a message, after the message's ok button is clicked, focus back on the textfield

//if it isnt empty, do nothing

if(TextField1.rawValue == null)

{"Input Required", "Alert", 3);;





This will handle ensuring that the textfield has an entry in it BUT, only IF the user enters the field. If they simply click to another field, this code will never run.

Fear can catch that too.

If you use the same code but put it in the PrePrint and PreSave events for the form, it will ensure that if the user attempts to print or save the form and the field is blank, they will have to enter something to continue.