Expand my Community achievements bar.

SOLVED

Transfer data from text field to text box

Avatar

Level 1

I'm creating a form in LiveCycle Designer and I'm wondering if it is possible to collect information in a text field and use it later in the same form in a text box. I want to enter a name into a text field and then have that name show up as part of a text box later in the form.

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi, it is easy enough to do with a global variable.

I wrote some information about creating and using them here - How to compare global variable value to TextField value

Have a look at it to understand the code below. It is much like setting a rawValue from another field, but instead you are taking it from a variable that can be used anywhere in the form.

To recall the global variable to a textfield:

//give the textfield the value of the global variable.

TextField1.rawValue = global.myVariable;

I wrote this PDF for my own reference, here is a screenshot.

In this example, i can set a new global variable in the first textbox and then recall it in the other when the button is clicked. Same thing applies if you did it from a click, field exit code...whatever.

1544153_pastedImage_1.png

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Hi, it is easy enough to do with a global variable.

I wrote some information about creating and using them here - How to compare global variable value to TextField value

Have a look at it to understand the code below. It is much like setting a rawValue from another field, but instead you are taking it from a variable that can be used anywhere in the form.

To recall the global variable to a textfield:

//give the textfield the value of the global variable.

TextField1.rawValue = global.myVariable;

I wrote this PDF for my own reference, here is a screenshot.

In this example, i can set a new global variable in the first textbox and then recall it in the other when the button is clicked. Same thing applies if you did it from a click, field exit code...whatever.

1544153_pastedImage_1.png