Expand my Community achievements bar.

PrePrint question


Level 3

I want to create a question on prePrint

The script is working, but wen i click on yes or no i've got the same message again.

For some reason i get the message twice.

I tried Javascript and Formcalc

Is there a solution?

the script is on a textField on a master page.

var Q1= (xfa.host.messageBox("Do you print on stationary?","titel",2,2)

if (Q1== 3)then

    // Answer is no

    $.presence = "visible";

    formulier1.pageSet.Pagina1.BasisItems.logo.BPRlogo.presence = "hidden";

elseif (Vraag1 == 4)

    // Answer is yes

    $.presence = "hidden";

    formulier1.pageSet.Pagina1.BasisItems.logo.BPRlogo.presence = "visible";


2 Replies


Level 7

I just rejigged it a bit and it seems to work (in formcalc):

var Q1= xfa.host.messageBox("Do you print on stationary?","titel",2,2)

if (Q1==3) then

     $.presence = "visible"

     formulier1.pageSet.Pagina1.BasisItems.logo.BPRlogo.presence = "hidden"


    $.presence = "hidden"

    formulier1.pageSet.Pagina1.BasisItems.logo.BPRlogo.presence = "visible"



Level 3

Thank you for your reply.

I moved the script to the beginning of the form and not on a formfield anymore.

And now it works like it should.

Why it doesn't work on the textfield on the masterpage is a mystery for me.