Hi
Once more I have a problem.
I have a field in which the user should enter 10 digits in the pattern 999999-9999. The field must only contain numeric data and must be exactly 10 characters. I have a validation script on the print button, that prevent printing if required fields are empty or not properly filled out.
I have tried two ways to work this out, and I'm not satisfied with any of them, as I can still print despite of validation scripts and warning messages.
1.
I set the field to numeric, limited to 11 characters.
Display pattern num{999999-9999}, edit pattern num{999999-9999} and validation pattern num{999999-9999}
Problems using this solution: When I type 11 digits in the field (ex.12345612345) I get a warning message and 12.345.612.
But when I type 9 digts (ex. 123456-123 or 123456123) I get no warning message and 000000-0000 or 012345-6123
If I type alphabetical characters (ex. 123456-abcd) I get no warning message and 000000-0000.
2.
I set the field to text field, limited to 11 characters.
Display pattern text{999999-9999}, edit pattern text{999999-9999} and validation pattern text{999999-9999}
Now when I type 11 digits in the field (ex.12345612345) I get no warning message and 12345612345.
When I type 9 digts (ex. 123456-123) I get no warning message and 123456-123
When I type 9 digts (ex. 123456123) I get a warning message and 123456123
If I type alphabetical characters (ex. 123456-abcd) I get a warning message and 123456-abcd.
It works slightly better as a text field, but I am not satisfied at all.
Has anyone a solution to this?
Additional I would also like the hyphen to emerge automatically when typing.
K