Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Linking textboxes

Avatar

Level 1

I have two things I would like to be able to do:

1.  I have a form that requires text to be entered on lines, because of this, each line has it's own text box.  I'm wondering if there is a way I can link them so that once one textbox is full, the text automatically is placed in the next text box.  I think I have found a couple ways to do this online already using javascript.  However, I have no idea how to begin going about inputting the codes?

2.  I was wondering if there was a way to make it so that information typed in one textbox appears in a second text box as well?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here is an example of both situations. The first one involves script to get the cursor to move automatically to the next line. I don't think I can get rid of the beep when each field is full.

The easiest way to get around the second issue is to use global bindings. This will copy the values automatically and does not require script. In the first case you have multiple fields so global binding will not work there. I have an example of combining multiple fields into one field.

Hope that helps.

Niall

ps I have added an example of just using a single textfield with no border/underline and then place a number line objects distributed. This would give you the effect you want, but without scripting, etc. 

View solution in original post

11 Replies

Avatar

Correct answer by
Level 10

Hi,

Here is an example of both situations. The first one involves script to get the cursor to move automatically to the next line. I don't think I can get rid of the beep when each field is full.

The easiest way to get around the second issue is to use global bindings. This will copy the values automatically and does not require script. In the first case you have multiple fields so global binding will not work there. I have an example of combining multiple fields into one field.

Hope that helps.

Niall

ps I have added an example of just using a single textfield with no border/underline and then place a number line objects distributed. This would give you the effect you want, but without scripting, etc. 

Avatar

Level 1

Thank you so much.  Both things you told me worked great!  I have been trying to figure this out for so long.  I can't believe it was so simple!  Thanks again.

Avatar

Level 1

Dear Niall,

The .pdf you shared with the forum is very helpful: 09-10-25 Textfield overflowing.pdf (79.6 K)  Thank you for sharing it.  In that document, you have a section that does exactly what I am seeking to do in LiveCycle Designer.  In your .pdf it reads as follows: "This is an example of a single textfield with separate lines. This solution does not involve scripting, solid lines are placed below the textfield." 

My problem is that while I can get a single text field with separate lines to accommodate running text, I cannot seem to get multiple solid lines to be placed below the text field.  In my effort to do so, I only get one large text box that has one single underline and lots of blank space above. 

If you could be so kind as to explain what goes into making a single textfield have multiple solid lines placed below the text, that would be appreciated.  The final page of my form has a "Notes" section and I need to create about thirty blank lines where the user can enter running/continuous text.  Needless to say, having just one underline and a huge amount of white spaces is making this page look amateur, to say the least. 

Thank you in advance for your assistance,

Catherine

Avatar

Level 10

Hi Catherine,

No problem. This example was set up to look at a particular problem.

If you look at the hierarchy you will see that I have placed solid lines down the form and then placed the textfield over these.

Parallels Desktop1.png

Spacing the lines takes a little trial and error based on your font and paragraph settings. However once you have the spacing sorted you can quickly copy the line down the page. If you select a single line you can go to the Edit > Copy Multiple menu. This will open a dialog where you can specify the number of times you want it copied and the direction and spacing:

Parallels Desktop1.png

This will work if the page is positioned and not flowed.

So I hope that helps. Maybe get the lines first and then deal with the textfield. Just make sure that the textfield's fill is set to none, so that you can see the lines through the textfield.

Good luck,

Niall

Avatar

Level 1

This worked perfectly! Thank you very much. Lots of tweaking of paragraph spacing, etc. but it worked brilliantly.

Avatar

Level 1

p.s. One of the easiest ways to get the line spacing correct is to go into the Paragraph palette and where it says "Line Spacing" select "Exactly _____pts" and enter in a point value that is a multiple of the point value of your font.  I used 8 pt. font in my form and with 16 point line spacing, the words fell exactly where I needed them to--on top of my line.  Since I use "Snap to Grid", I put lines on every other horizontal grid row.  If I put lines on every grid row, I would have used 8 pt. font instead of 16 pt.  Hope that helps!

Avatar

Level 1

I know this thread is old, but it very helpful. I do have one question. Please reply if you have received this notification. Thank you!

Avatar

Level 1

Oh great! You were so helpful to the others, I was hoping you'd still be around!

Anyway, I want to have the continuous text lines as you described in your pdf file (the one with no scripting). However, I did not create my form in Adobe; it was created in Word then converted to a .pdf. There are five lines already placed on the form that I want my users to be able to type on. I wasn't able to do it like the way you described to do so in your file (unless I did it wrong!), so will I be able to do so how I have the form or will I need to re-create in Adobe? I can upload if that will help you see better what I am trying to do.

Avatar

Level 10

Hi,

Importing an existing document into LC Designer, in order to transfer an existing form can be done. However you will have limited functionality. Particularly if the form is intended to have dynamic behaviour.

I would recommend that you recreate the form in LC Designer. You can then save this as a Dynamic XML Form in the save-as dialog.

Hope that helps,

Niall