These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setfocus/Continue Text? [Form Attached] Next line scenario/question.

Tech264
Registered: Apr 4 2008
Posts: 111
Answered

Attached is a form that I've always been curious to know if Livecycle has a Formcalc/Javascript code that when a person types a simple lined form (like a notebook paper) their text input will go to the next line without having to hit the tab button. I know most people will just say you should just create a single text field and make it a multi-line but what if that's not what a client wants? Do you persuade them that this is the only option or can it be done?

All the rows in this form have been checked to set Limit length to visible area. The form has also been saved as a dynamic form.

Any responses will be greatly appreciated.

http://narcofreedom.com/forms/summary_test.pdf

My Product Information:
LiveCycle Designer, Windows
xrum
Registered: Feb 25 2009
Posts: 124
I don't think it's possible....
Tech264
Registered: Apr 4 2008
Posts: 111
I was wondering about that because in the two years I've been using Livecycle I've never seen a sample lined form like this one. Who knows maybe one day there will be way since a lot of forms are usually like this format.
jonom
Registered: Jan 31 2008
Posts: 133
There's a post on John Brinkman's FormFeed blog which might get you started:
http://blogs.adobe.com/formfeed/2009/04/field_tab_on_full.php
formman
Registered: Jul 17 2008
Posts: 44
It is possible. You need to set the field max chars and then use code to check the current number of characters. When it reaches max then fire and exit event with a setFocus.

If you try to use the full method you will find that you must first fill the field and then on the next keypress you will be taken to the next field. Unfortunately you lose that next keystroke.

Rick Kuhlmann

Forms Developer/Designer
Tech-Pro, Inc.
Roseville, MN

Tech264
Registered: Apr 4 2008
Posts: 111
I took a look at that site and it seems the code provided is for Acrobat 8.1. I did try it with Livecycle and I downloaded the sample they had and tried to apply it to the form I posted here and it didn't work.

The one that's interests me is the Max Characters. When you check it by default the max is 255. When you start typing and go beyond the actual form design you get the little black (+) symbol towards the end. Can you apply code if you also have checked off 'Set Limit to Visible Area'?

Also could you provide the code that you're talking about so I can test it with the form that's attached?
jonom
Registered: Jan 31 2008
Posts: 133
Tech264 wrote:
I took a look at that site and it seems the code provided is for Acrobat 8.1. I did try it with Livecycle and I downloaded the sample they had and tried to apply it to the form I posted here and it didn't work.
The code is all LiveCycle.

I doubt you'd be able to drop the code in and use it without tweaking. The magic happens in the FullEvent script object. Make sure you copy that over to your form as well.

I just tried the sample pdf with typing in the fields and it seems to work fine. So maybe it is usable without tweaking.

The problem seems to be with tables...if you check the documentation in the script object it says that the tab order has to be set explicitly. This doesn't seem to work with tables - I think the only way it would work would be to go into the xml and add ... tags manually.I tried it with some text fields and it worked fine.

I think I saw something somewhere about some sort of trigger for a field being full (limited to visible area) but can't remember where.

I'd try posting a question with regards to the code on John's blog and see if there's another way to do it - he's quite responsive, and if he doesn't know how to do it I doubt anybody does. ;)
Tech264
Registered: Apr 4 2008
Posts: 111
Here's an edited version of the form with the FullEvent code from that site. I looked at the XML source and I see the statements you talked about but not sure where to place it. Looks dangerous to mess with.http://narcofreedom.com/forms/summary_test2.pdf

If you can attach what you did so I can play with it that would be helpful because I'm really curious to see this work.

Thank you.
formman
Registered: Jul 17 2008
Posts: 44
Tech264,

As I looked at your sample and thought about it some more I realized that providing this functionality is probably not attainable without a lot of coding, etc. and it may not be possible to do at all. I do remember reading an article on it somewhere but I am at a loss to remember where, maybe someone else on the forum remembers.

If the client wants to have a lined text area for users to complete maybe the compromise is to provide that are when the form is printed empty or blank. If the user fills it out online and submits or fills and prints then the field stays as a regular multi-line text field.

Rick Kuhlmann

Forms Developer/Designer
Tech-Pro, Inc.
Roseville, MN

Tech264
Registered: Apr 4 2008
Posts: 111
I agree I was even asked if I use a multi-line textfield could I just have the text underline as they type. I told them that it just doesn't look right at all on a form. So I guess multi-line text field will have to do or the good old tabbing will do as well.

formman wrote:
Tech264,As I looked at your sample and thought about it some more I realized that providing this functionality is probably not attainable without a lot of coding, etc. and it may not be possible to do at all. I do remember reading an article on it somewhere but I am at a loss to remember where, maybe someone else on the forum remembers.

If the client wants to have a lined text area for users to complete maybe the compromise is to provide that are when the form is printed empty or blank. If the user fills it out online and submits or fills and prints then the field stays as a regular multi-line text field.

Rick Kuhlmann
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

won't a text with the underlines behind a multiline text field be a good compromise?

https://share.acrobat.com/adc/document.do?docid=c6b55faa-b32a-4208-82ae-79ccb3fa422a

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

jonom
Registered: Jan 31 2008
Posts: 133
Tech264 wrote:
Here's an edited version of the form with the FullEvent code from that site. I looked at the XML source and I see the statements you talked about but not sure where to place it. Looks dangerous to mess with.
I'm afraid I don't have time to test out the traversal tags with the table, but if you look at existing statements in the xml it's easy to pick out where to put them - nothing dangerous, all it is is a tabbing reference for where to go next.

Quote:
If you can attach what you did so I can play with it that would be helpful because I'm really curious to see this work.
I didn't save the file I was playing with. I just copied John's script object into a form, plopped down some text fields, set the tab order, put the code on their on their "change" event and they worked.
jonom
Registered: Jan 31 2008
Posts: 133
Finally had a chance to try playing with this using the traversal tags in a table but couldn't get it to work, tab order always seems to get reset.
Tech264
Registered: Apr 4 2008
Posts: 111
Yeah I had no success either, it was worth a try though. That's probably why I didn't see a lot of rule paper type of forms. Thank you very much for revisiting the issue.
jonom
Registered: Jan 31 2008
Posts: 133
Niall over on the Adobe Forums posted an example for someone who was looking to do the same thing - works great and is quite simple...I can't believe I missed the "full" event I mentioned earlier - it's one of the field events!

http://forums.adobe.com/message/2339996#2339996
sandymc
Registered: Jul 12 2010
Posts: 2
I am new to this forum and fairly new to creating Adobe forms. I have been doing it for a year, but totally self taught. NO one else at the company can even do as much as I can now. I was looking for an answer to my biggest problem - LINED form and needing to be able to print to it.

Jonom's answer below linking back to adobe forum has the answer, the second part of Niall's sheet is exactly what I am looking to do - can anyone tell me how he did it?
Thanks :/