Skip to main content
August 30, 2016
Question

Need custom formatting script AND number format

  • August 30, 2016
  • 2 replies
  • 1137 views

Hi, I have a script to create a placeholder text in my field until I click into it and wish to enter data: if (!event.value) event.value = "Activity/Breakdown goes here";

However I need to add this to a field that also requires the format to be number only. How do I retain the custom script and add the script to make it number format only?

Sorry if this is extremely novice, but not sure how to make the two run side by side.

Thanks,

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
August 30, 2016

When you select one of the built-in formats, Acrobat will configure the field with a Keystroke script and a Format script. The keystroke script limits what a user can enter, and the format script formats what the user entered. So what you need to do is set up a custom keystroke and format script that does what you want. If you let us know exactly what number format you want to use, we can suggest ways to set it up. For example, number format, 2 digits to the rights of the decimal, no currency character, no thousands separator, etc.

August 31, 2016

I just need a UK currency number format (i.e £2,000), no decimals needed, and for the placeholder text script (if (!event.value) event.value = "Activity/Breakdown goes here";) to work in conjunction with it.