THESE FORUMS NOW CLOSED (read only)

  • 19 Apr 2024, 09:07
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Limit characters in a PDF form?  (Read 12928 times)

Elysiana

  • 1-800-SCABIES
  • ****
  • Offline Offline
  • Posts: 837
  • Make me Fibonacci
Limit characters in a PDF form?
« on: 22 Mar 2011, 08:18 »

I am making a fillable PDF form and two of the fields need to be alphanumeric only. Apparently people don't understand "alphanumeric" or "A-Z 0-9 ONLY" so I'd love to just make it so that they can't possibly put anything other than those characters in the field. I'm not really sure how to look this up; I've done a few searches with no luck and I don't know if it's not possible or I'm just not searching for the right terms. The Acrobat forums had something about setting it up for just alpha but they didn't explain how to do it (something about adding JavaScript but I have no idea how you even do that). I'm like a lost puppy!

(I hope I'm asking in the right spot; it's not game-related but it's program-related.)
Logged

pwhodges

  • Admin emeritus
  • Awakened
  • *
  • Offline Offline
  • Posts: 17,241
  • I'll only say this once...
    • My home page
Re: Limit characters in a PDF form?
« Reply #1 on: 22 Mar 2011, 08:50 »

Is this helpful, or do you need more?
Logged
"Being human, having your health; that's what's important."  (from: Magical Shopping Arcade Abenobashi )
"As long as we're all living, and as long as we're all having fun, that should do it, right?"  (from: The Eccentric Family )

Elysiana

  • 1-800-SCABIES
  • ****
  • Offline Offline
  • Posts: 837
  • Make me Fibonacci
Re: Limit characters in a PDF form?
« Reply #2 on: 22 Mar 2011, 09:23 »

I'm almost positive that's what I'm looking for, but I have no idea where to put that info. I've been searching through LiveCycle's help files and I'm finding stuff about validation but when I try to enter that script it says it's invalid so I must be in the wrong place.

I'd rather not sign up for Adobe's forums since I have a swiped copy, but I may have to.
Logged

pwhodges

  • Admin emeritus
  • Awakened
  • *
  • Offline Offline
  • Posts: 17,241
  • I'll only say this once...
    • My home page
Re: Limit characters in a PDF form?
« Reply #3 on: 22 Mar 2011, 10:21 »

You are using Acrobat to generate the form, right?  I'll link to my work machine (where I have a copy) later this evening and try to work it out.
Logged
"Being human, having your health; that's what's important."  (from: Magical Shopping Arcade Abenobashi )
"As long as we're all living, and as long as we're all having fun, that should do it, right?"  (from: The Eccentric Family )

Elysiana

  • 1-800-SCABIES
  • ****
  • Offline Offline
  • Posts: 837
  • Make me Fibonacci
Re: Limit characters in a PDF form?
« Reply #4 on: 22 Mar 2011, 11:14 »

Using Adobe LiveCycle Designer, actually (which I guess is built into Acrobat, so yes).

You're awesome, thank you!
Logged

pwhodges

  • Admin emeritus
  • Awakened
  • *
  • Offline Offline
  • Posts: 17,241
  • I'll only say this once...
    • My home page
Re: Limit characters in a PDF form?
« Reply #5 on: 22 Mar 2011, 16:25 »

Wow, that was hard to find.  You know how some things are just hard to Google because the search terms are so common, and others are hard to find because everything on the entire Internet  starts with the presumption of some knowledge you don't have?  Well, this fell into both categories; even though I had a copy of Acrobat Pro and its help open as well!  You can also tell that Forms in Acrobat is something I've never done before.

Here's the deal (and you probably won't like it): custom validation is not available with LiveCycle forms, only with AcroForms.

Did you know there were two completely different incompatible types of form in there?  I didn't.

You don't "create" an AcroForm.  You create a vanilla PDF document, and you add form fields to it.  The easiest way is to enable the Forms toolbar (View | Toolbars | Forms); then you click on an icon to select, say, the text input tool, and then double click with that tool in the document where you want that field.  Right-click the field and select properties; when they appear, select the Validate tab, and you will see a box (enabled by a radio button) where you can put the custom validation script (cut and paste from the page I first linked you to).

Good luck!
Logged
"Being human, having your health; that's what's important."  (from: Magical Shopping Arcade Abenobashi )
"As long as we're all living, and as long as we're all having fun, that should do it, right?"  (from: The Eccentric Family )

Barmymoo

  • Mentat
  • *****
  • Offline Offline
  • Posts: 9,926
Re: Limit characters in a PDF form?
« Reply #6 on: 22 Mar 2011, 16:29 »

If all else fails, you could put "Use letters (a b c) and numbers (1 2 3) only", which might be more clear than "alphanumeric".
Logged
There's this really handy "other thing" I'm going to write as a footnote to my abstract that I can probably explore these issues in. I think I'll call it my "dissertation."

Elysiana

  • 1-800-SCABIES
  • ****
  • Offline Offline
  • Posts: 837
  • Make me Fibonacci
Re: Limit characters in a PDF form?
« Reply #7 on: 22 Mar 2011, 20:18 »

Thank you so much for looking into that! Glad to know it wasn't just me having trouble finding answers - you're right about them assuming you have some prior knowledge of what to do. I guess I just need to look into putting a newer version of Acrobat on my computer. In the meantime, I may just have to suck it up and change the ones that are done wrong.


I don't have a lot of room to put the instructions for that field, and to be honest, people don't seem to be reading ANY of the instructions on the form. I thought "A-Z 0-9 only" would clear it up because maybe "alphanumeric" was just something they weren't familiar with, but apparently that didn't help either. grrr
Logged

celticgeek

  • GET ON THE NIGHT TRAIN
  • *****
  • Offline Offline
  • Posts: 2,697
  • Linux Geek
    • The Celtic Geek
Re: Limit characters in a PDF form?
« Reply #8 on: 22 Mar 2011, 20:29 »

There is a general rule for that:  "If all else fails, read the instructions."  Applies to almost everybody. 
Logged
a 'dèanamh nan saighdean airson cinneadh MacLeòid
We Wear Woad When We Write Code
Ní féidir liom labhairt na Gaeilge.
Seachd reultan, agus seachd clachan, agus aon chraobh geal.

mberan42

  • Bling blang blong blung
  • *****
  • Offline Offline
  • Posts: 1,174
  • Fry... You're my friend...
Re: Limit characters in a PDF form?
« Reply #9 on: 22 Mar 2011, 20:54 »

@ celticgeek tl;dr: RTFM
Logged
My parents were always on me to groom myself and wear underpants. What am I, the pope?!

pwhodges

  • Admin emeritus
  • Awakened
  • *
  • Offline Offline
  • Posts: 17,241
  • I'll only say this once...
    • My home page
Re: Limit characters in a PDF form?
« Reply #10 on: 23 Mar 2011, 00:27 »

I guess I just need to look into putting a newer version of Acrobat on my computer. In the meantime, I may just have to suck it up and change the ones that are done wrong.

It's not a matter of version - AcroForms is the original, and at Acrobat 7 they added LiveCycle Editor to the package as a fully-functional and integrated demo of the alternative because of its other properties; however, it simply lacks the functionality you want.  So your choice is to do without the validation or to throw the form you've made away and start again using the older technology which maybe works for you.
Logged
"Being human, having your health; that's what's important."  (from: Magical Shopping Arcade Abenobashi )
"As long as we're all living, and as long as we're all having fun, that should do it, right?"  (from: The Eccentric Family )

Elysiana

  • 1-800-SCABIES
  • ****
  • Offline Offline
  • Posts: 837
  • Make me Fibonacci
Re: Limit characters in a PDF form?
« Reply #11 on: 23 Mar 2011, 05:27 »

Ohhh gotcha. Wait... so they removed some functionality for the handy little editor they added that was supposed to make everyone's lives easier? Go team.

Considering they have a handy little button that you can click to change a regular field into a numbers-only field, you'd think they'd have one for this.

Oh well. Thank you again, I really appreciate it!
Logged

pwhodges

  • Admin emeritus
  • Awakened
  • *
  • Offline Offline
  • Posts: 17,241
  • I'll only say this once...
    • My home page
Re: Limit characters in a PDF form?
« Reply #12 on: 23 Mar 2011, 06:48 »

LiveCycle is a separate product; and the form designer was sort-of shoehorned into Acrobat and the PDF format, presumably to try to pull in users to the whole LiveCycle suite.  LiveCycle has some nice features that AcroForms don't offer, but also misses some features as we have just seen.  If you are not using any of the LiveCycle form features, then redoing your form in "pure" Acrobat is your way forward.
Logged
"Being human, having your health; that's what's important."  (from: Magical Shopping Arcade Abenobashi )
"As long as we're all living, and as long as we're all having fun, that should do it, right?"  (from: The Eccentric Family )

snalin

  • Vulcan 3-D Chess Master
  • *****
  • Offline Offline
  • Posts: 3,540
  • You may Baste me
Re: Limit characters in a PDF form?
« Reply #13 on: 23 Mar 2011, 15:59 »

and others are hard to find because everything on the entire Internet  starts with the presumption of some knowledge you don't have? 

Or it starts with the presumption that you know nothing at all.

The first semester of programming was such a bitch since every tutorial either went from "this is how you create a "hello world" app" and outwards from that, or started with the presumption that you have been working in the field for three years and are looking for something that's more specific than the api. Same problem with both php/html and with bash scrips.
Logged
I am a cowboy / on a steel horse I ride
I am wanted / Dead or alive
Pages: [1]   Go Up