Confirmation Checkboxes
I am currently designing a form in Acrobat Pro with Javascript providing the required functionality. The form has 7 pages with two hidden as templates.
I have two paired checkboxes Competent and Not Yet Competent (NYC). When the NYC checkbox is selected I want the twp hidden template pages to appear but I also want to alert the person that by selecting the NYC the pages will appear and do they wish to proceed. If they select 'Yes' then the checkbox will be ticked and pages will appear. If they select 'No' then the checkbox will not be ticked and the pages will not appear.
I am using the follow script:
event.target.checkThisBox(0, app.alert("By selecting this checkbox the Re-assessment pages at the bottom of this document will appear for re-assessment purposes. To remove the Re-assessment pages select the Competent or Satisfactory checkbox to the left.\n\nCheck this box?",2,2)==2);
this.getTemplate("Page6").
spawn(5);
this.getTemplate("Page7").
spawn(6);
My issue is that if a person selects 'No' then the template script still runs and the pages appear which I don't want if 'No' is selected. This has to work in Reader as most of my customers only have Reader DC.
I am not new to Java but I am no expert by any means so any assistance would be appreciated.
