Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Additional Note: I am not an expert and I do not know how to write scripts etc. Please explain in layman's terms 🙂
Copy link to clipboard
Copied
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) + "'";
}
Copy link to clipboard
Copied
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???
Copy link to clipboard
Copied
Make the window larger by dragging one of its corners and you'll see an "OK" button.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now