Avatar

Level 10

Hi Sonya,

Something like this in the exit event of the numeric field (i'd recommend a numeric field because then when you are testing you are dealing with just numbers):

if (this.rawValue < "25000")

{

     this.rawValue = "25000";

     xfa.host.messageBox("The minimum value for this field is 25,000. \n\nI have reset the field to this minimum value for you. \n\nThank you!", "Minimum value", 0, 0);

}

When you select the field you can give is a display pattern from the Object > Field tab:

num{z,zzz,zzz,zz9}

You can extend this by wrapping additional text strings in single quotes.

num{z,zzz,zzz,zz9' booklets'}

The help file will have more information on the messageBox and patterns.

I hope that works,

Niall