12 Replies Latest reply on Sep 11, 2017 5:30 AM by calvins61590516

    display page template after checkbox is ticked

    calvins61590516

      Hoping someone can assist me, I am developing a acrobat form and am struggling a little bit! Basically I want the user to tick a checkbox and then click a button. If the checkbox is ticked when the button is pushed then the form should add a page template. At the moment I have the below code for this part however when I preview the form, it doesn't matter whether if the checkbox is selected or not selected, it spawns the page template anyways. This makes me think that there is something not right about my if statement. Can someone explain what I am doing wrong here?

       

      *Advice is the name of the checkbox item.

       

      var advice = this.getField("Advice");

      if (advice = "true")

      {

      var advicePage = this.getTemplate("advice");

      advicePage.spawn(this.numPages, true, false);

      }