Expand my Community achievements bar.

Grey out the same field in 2 locations?

Avatar

Level 8

Hello

I have page1 and page3 in my_form. Page1 has field with caption 'COUNTRY', Page3 also has the same field (Caption is COUNTRY's NAME), and BINDed with same data source, and the NAME is same in BINDING tab, in both fields NAME is UR_COUNTRY in BINDING tab, fine.

Requirement is to make it grey out (at 2 locations, its Page 1 and Page 3) and ReadOnly as well, so, i am wring the below Java Script in my_form's docReady event

my_form.Page1.Address.COUNTRY.access = "readOnly"

xfa.resolveNode("my_form.Page1.Address.COUNTRY.ui.#textEdit.border.fill.color").value = "192,192,192";

Its greying out in Page1's COUNTRY field, but NOT greyinh out the Page'3 COUNTRY's NAME field!! not sure why?

Pls. let me know How can i do it WITH OUT code redenncy (code redenency is not accepting against standards here)?  I do not want to repeate the code again in Page3's COUNTRY's NAME field initialization event

Thank you

0 Replies