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.

Changing the appearance of master page button

Avatar

Former Community Member

I am trying to change the appearance of a master form submit button dynamically. However, when the script I'm using runs, the change can only be seen on the first page of the form. The buttons on the pages after the first retain their original appearance.

The script I'm using looks like this:

 

form1.page2.Button1::click - (JavaScript, client)

if  (NumericField3.rawValue == 2)

  { form1.Page1.EmailSubmitButton1.caption.value.text  = "Submit"; }

I would really appreciate any ideas. Thanks

2 Replies

Avatar

Former Community Member

I figured out a solution:

form1.page2.Button1::click - (JavaScript, client)

if  (NumericField3.rawValue == 2) {

     for (var i=0; i<xfa.layout.pageCount(); i++) {

          xfa.resolveNode("form1.Page1[" + i + "].EmailSubmitButton1").caption.value.text = "Submit";

     }

}

Avatar

Level 5

You have to use the following in FORMCALC.

Formular1.pageSet.Site1[*].Button1.caption.value.text = "submit"

You don't need a loop.

masterpage.jpg

Your script have to be:

if(this.rawValue == 2)then

    Formular1.pageSet.Site1[*].Button1.caption.value.text = "submit"

endif

masterpage1.jpg

Hope helpful

Mandy