Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Changing the appearance of master page button

Avatar

Level 1

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

0 Replies

Avatar

Level 1

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