Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Form Field Calculation OR Script Needed ASAP

New Here ,
Aug 09, 2024 Aug 09, 2024

I want to create a basic form that several different people will use. In this form, the user would enter a measurement in inches but when they tab or press enter, I would like their entry to convert automatically to feet & inches based on their input.

 

Does that make sense?

 

Example: The user puts in 115" and then goes to the next field. It would change the entry to 9.58' (the actual is 9.58333')

 

Here is a screenshot of the form fields.

Screenshot 2024-08-09 140359.png

 

 

TOPICS
Windows
245
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2024 Aug 09, 2024

Additional Note: I am not an expert and I do not know how to write scripts etc. Please explain in layman's terms 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2024 Aug 09, 2024

Enter this code as the custom Format script of the field (under Properties - Format - Custom):

 

if (event.value) {
	event.value = (Number(event.value.replace("\"", ""))/12).toFixed(2) + "'";
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2024 Aug 09, 2024

When I enter the above into the Javascript editor box, I have the option to cancel to Go To. When I click the Go To button, it is asking for me to enter a Line Number???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2024 Aug 09, 2024
LATEST

Make the window larger by dragging one of its corners and you'll see an "OK" button.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines