Yes, there is a character limit to the internal JS editor. The way around it is to use an external one, like Notepad.
Keep in mind, though, that you have to close the external file each time you edit it if you want it to update in the PDF.
Maybe I haven't had enough caffeine yet this morning but I can't figure out how it actually works. I changed the the editor to Notepad, like you said. I went into the form field editor and went to my Group Name field and then clicked edit beside Custom Calculation Script. I pasted in my code - hit the X button - asked me if I wanted to save and I said yes. Then I hit close again. Saved my pdf and then reopened it. But it's not running the script when I put in a group number. What am I missing?
What you described sounds correct (although there's no need to close and open the PDF file)... Maybe there are errors in your code? Do you see anything in the JS console?
I think I might have one error but I thought I had corrected it. Let me run this by you. My "if" lines are like this:
if(a == '88096') event.value = 'Stacy's Carpet Steam Cleaning Company';
But the code doesn't seem to like the ' in the Group's name. Is there a way to correct that without getting rid of the ' .... ?????
1 person found this helpful
If have to escape the single-quote inside the string, like so:
if(a == '88096') event.value = 'Stacy\'s Carpet Steam Cleaning Company';
You are a GENIUS!!!! Wanna be my new best friend??? lol ....
You are going to be my "go to" person now!!!! AMAZING!!!!