Is there a way to format a time field in a form without the help of the colon?

I want users to type 200 in a form field and the result would be at 02:00. or have changes 430 at 04:30 automatically, etc.  Is there a script for this?

Thank you!

A custom script can be written to do...

For example, this code can be used as the script of custom Format to achieve this goal:

If (event.value.length == 3) event.value = event.value.substring (0.1) + ":" + event.value.substring (1);

In addition, you can use this code in your custom script from typo to allow only numbers:

Event.RC = / ^ \d*$/.test(event.change);

Then, simply set the field as having 3 characters maximum and you are pretty much done.

Tags: Acrobat

Similar Questions

Maybe you are looking for