Expand my Community achievements bar.

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