Copy link to clipboard
Copied
I created a field to enter a number like this, 1 5/8 or 1 7/8 to 2 7/8 etc. I would like to not have to type in the " mark every time. I have this javascript that does what I want, but to whole numbers not fractions. Take a look a this script and perhaps it can be modified to get the job done.
my code (in the Custom Format)
AFNumber_Format(0,0,0,0,"\''",false);
I''ve tried to play around with it a little bit but couldn't get it. If you know, please let me know? Thanks.
So, "5/8" is not a number, it's text, so you have to use text formatting. As it turns out this is extremely easy.
Use this as a custom format script.
if(event.value.length)
event.value += "\"";
Copy link to clipboard
Copied
So, "5/8" is not a number, it's text, so you have to use text formatting. As it turns out this is extremely easy.
Use this as a custom format script.
if(event.value.length)
event.value += "\"";
Copy link to clipboard
Copied
hi Thom, that was fast. Thank you. That's what I wanted.
I also wanted to talk to you about your stamp book. I'm playing around with them and have successfully made some. They're simple static ones though. But, I'd like to create the dynamic types. Does your book show how to create them? I mean like the source code and examples? I've seen these stamps (I think they were stamps) on the internet where there's an interface that have drop downs and can import info from Excel spreadsheets and all kinds of neat things. Does your book go into this kinds of advanced scripting? Would you have any other examples other than your short demo video on your site? I'd like to really spend more time checking it out.
Copy link to clipboard
Copied
Yes the book covers many advanced scripting techniques for Dynamic stamps, that was kinda the point. You'll also find more info and examples at www.pdfscripting.com.