Expand my Community achievements bar.

SOLVED

flowing text from one text field to another in a livecycle subform

Avatar

Level 2

Hello all,

I have a dynamic form created in Adobe Livecycle Designer ES, which contains a number of subforms positioned inside a flowable page. I want to have two text fields inside one of the subforms work so that text entered into the first text field (non-expandable) will continue into the next text field (which is an expandable field.) I know that there is a script inside Acrobat which will do this, but can't figure out how to write a JavaScript for the livecycle designer form.

Both fields work as stand-alones with no problem, but not as described above.

(Here is the Acrobat XI script, which doesn't work for in livecycle, but give some idea of what I am trying to do:

Action: Triggered on mouse up/Execute menu item

/*********** belongs to: AcroForm:textfield1:Keystroke ***********/

if ( event.fieldFull || event.willCommit )

this.getField("textfield2").setFocus();

//</ACRO_script>

//</AcroForm>

Is there a corresponding JavaScript for livecycle? Thanks for any suggestions!

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi,

You can use the full event here for the text field that's length is fixed. So write the following code in the full event of the text field whose length is fixed.

xfa.host.setFocus(The Text Field whose length is not fixed)

Thanks,

Bibhu.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

Hi,

You can use the full event here for the text field that's length is fixed. So write the following code in the full event of the text field whose length is fixed.

xfa.host.setFocus(The Text Field whose length is not fixed)

Thanks,

Bibhu.

Avatar

Level 2

Thank you Bibhu, wherever you are!

This set me on the right path.

I set up the script on the full event as per your instructions

I inserted the following code on Textfield1:

xfa.host.setFocus(form1.page1.SubjectChoice1.Textfield2);  (and held my breath as i tested the form....)

Success!! Kudos to you for the quick and correct answer... Many thanks.

Nellie

Avatar

Former Community Member

     It's work only if i fill textfield manually. But when I bind data to the first textfield (with limit length) all text fill first field and second left empty((( what have I to do to flow text in this case?