Previous Thread
Next Thread
Print Thread
INFILD Social Security #13205 12 May 05 06:55 AM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
Does/did INFLD have a TYPE code for inputing and displaying Social Security numbers?

Have a nice Day.

Re: INFILD Social Security #13206 12 May 05 09:17 AM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,650
The problem with social security numbers is that they have multiple formats (xxx-xx-xxxx or xx-xxxxxx and possibly others). Since I was never sure just what the rules were, if any, I wasn't sure how to make a special TYPE code for it.

If you are able to determine in advance what format you want, then one possibility you might want to consider is using the "form" feature, where you use TYPEs "f" and "A", and then specify the form in the SETDEF parameter, using special characters A (alpha), 9 (numeric), X (any), for example:

TYPE="Af"
XMAX=11 : XMIN=11
SETDEF="999-99-9999"

This would display the dashes immediately, and only allow the user to enter numeric digits in the other positions. The dashes are not included in the test returned to the program, but they are automatically reinserted on display.

NOTE: in researching this, I just now realized that the documentation is pretty silent on this feature, although I think it must have been covered in the old AMOS documentation for INFLD. Particularly confusing is the fact that when SETDEF is used to specify a list of possible inputs, the wildcards are different (#=numeric, @=alpha, ?=any one, *=any).

ALSO NOTE: If you don't like the choice of formatting/wildcard characters in the form, you can specify them at runtime using the following:

SETDEF="~~@#?###-##-####"

In the above SETDEF, the two tildes at the start signal that the next 3 characters are the definitions for the Alpha, Numeric, and Any wildcards. So in this example, we have changed the "form" wildcards to match those used by the regular SETDEF list matching wildcards (i.e. #=numeric) and then used those to specify a traditional social security format.

One problem with the "form" scheme in the proportional font world is that spaces are so small that the form is not easily recognizable until the user starts typing. For this reason, it seems more common nowadays to either break these fields into separate input fields, or to just allow the user to type their own formatting characters.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3