Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Duplicate a text field in LC & get the Text automaticaly in the 2nd

Avatar

Level 2

Hi

I want to duplicate a text field the problem is that i want something more

when i write in the first "Text Field" i would like that the same Text appears automaticaly in the second "Text field" 

We can do it in Acrobat Pro but i don't know in LC

Thanks

4 Replies

Avatar

Former Community Member

If your form contains two fields, 'foo' and 'bar', there are several ways to accomplish this objective including:

// form1.page1.subform1.foo::exit - (JavaScript, client)

form1.page1.subform1.bar.rawValue = form1.page1.subform1.foo.rawValue;

// form1.page1.subform1.bar::calculate - (JavaScript, client)

this.rawValue = form1.page1.subform1.foo.rawValue;

Purists might tend toward the calculate approach.

Steve

Avatar

Level 2

Hi Steve

i am not very confortable with Java

do you mind to explain me how to do

I have two fields one into the Page #1 (Company_Name)  and another one into the page #2 (Company_Name)

thanks

Avatar

Level 10

Hi,

In addition to Steve's scripting you can set the binding of the field(s) to "Global" in the Object / Binding tab. This will work if both fields have exactly the same name in the hierarchy (Company_Name).

In fact any object with the same object name will inherit the value put in on page 1.

Good luck,

Niall

Avatar

Level 2

THANK YOU NIALL

it's working......you are the best

bye