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

Forcing a text field to not accept smaller value than 3

Avatar

Level 3

I have a text field which user can enter a number value. But the entered value cannot be less than 3. How can I do that?

1 Accepted Solution

Avatar

Correct answer by
Level 7

It is probably best to use a numeric field rather than a text field if you only want numbers but either way you can put in the exit event of the field (in formcalc):

if ($ < 3) then

xfa.host.messageBox("The value cannot be less than 3")

$ = ""

endif

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

It is probably best to use a numeric field rather than a text field if you only want numbers but either way you can put in the exit event of the field (in formcalc):

if ($ < 3) then

xfa.host.messageBox("The value cannot be less than 3")

$ = ""

endif