Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Copy from page1 my_NAME to page3 my_NAME?

Avatar

Level 8

Hello

I have 3 pages in my_form, page1 has Address details and Page 3 also has the Address details.

When user enters the address details on Page1, my below Java Script is copying them to Page3 address details, fine.

(I wrote it on Page1 's Name field's EXIT event)

var myName;

myName1 = this.rawValue;

xfa.resolveNode("my_form.Page3.Address.NAME").rawValue = myName;

Working fine.

But, requirements is: If user changes the value in NAME field of PAGE3, it should NOT copied over to Page1's NAME field, meaning, NOT vice versa! Top to bottom (Page1 to Page3) is okay, but not COPY from Page3 to Page1 (bottom to top).

Pls. let me kow how to get it done?

Thank you

3 Replies

Avatar

Former Community Member

If the name field does not have global binding and there is no script attached to page 3 name, changing the name on page 3 should not change the value of name on page 1.

Steve

Avatar

Level 8

Yes, both are having GLOBAL binding, both are referring NAME_VALUE binding data source.

But, i did not put any Script on Page3's NAME field

So, any idea pls?

Thank you

Avatar

Former Community Member

Change the data binding on each name field to use "Use name".

Additionally, as a practice, if you can avoid using resolveNode do so. It can be an expensive operation in a complex form.

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

if (!(this.rawValue == "" || this.isNull)) {

          form1.page2.subform1.name.rawValue = this.rawValue;

}

Steve