Jump to content

This topic is 8253 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I search a way to format automatiquely phone numbers. I mean user enter 0102345678 in the field, after he leave the field the value is displayed ass 01 02 34 56 78 (but if possible without change of the value put in the field 0102345678, then when user need to edit this field, he will get 0102345678 to modify).

Thanks every one

Posted

Have 2 fields, 1 a text field "NumberInput" and the other a calculation text field "NumberDisplay" where

NumberDisplay =

If(IsEmpty(NumberInput),"Enter a 10 digit phone number",Left(NumberInput,2) & " " & Middle(NumberInput,3,2) & " " & Middle(NumberInput,5,2) & " " & Middle(NumberInput,7,2) & " " & Right(NumberInput,2))

You should have NumberInput validated by a calculation :P Length(NumberInput) = 10 to make sure that users enter 10 digits.

Now, fill both fields with white, format NumberDisplay not to allow user entry and bring it to the front, and exactly on top of, NumberInput.

The user will now see the message "Enter a 10 digit phone number" in the field. When they click on the field, NumberInput will come to the front, and when they enter a number and leave the field, Number Display will be at the front, displaying the formatted number.

This topic is 8253 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.