Skip to main content
sylwiad4164059
Participant
January 24, 2020
Answered

"If" in JavaScript to open a new window below given answer in PDF form

  • January 24, 2020
  • 1 reply
  • 1303 views

Hey,

 

is there anyone who could help me write the commend to my PDF form in JavaScript?

What I would like to achive is function "if".

If the responder give the answer "czynnik, który miał decydujący wpływ" then PDF plese open additional question below with required text answer.

To make myself 100% clear i attached screenshot with explenation.

 

Please, please, please help me. I would be very apprecieate for any tips.

This topic has been closed for replies.
Correct answer Wardenburg

Ah the checkboxes dont have the confirm tab, see this example instead of how Id do this then

 

https://we.tl/t-T4ow7ihmOu

1 reply

Inspiring
January 24, 2020

Assuming the value of the button is 'czynnik, który miał decydujący wpływ' (might just want to make it 4, but thats up to you) 

and that the question field name is 'questionfieldname'

 

Put the following under the confirm' tab in the button field on row 4 

 

 

if (event.value=="czynnik, który miał decydujący wpływ"){
    this.getField("questionfieldname").display = 0;
}else{
    this.getField("questionfieldname").display = 1;
}

 

sylwiad4164059
Participant
January 24, 2020

Thank you, for your answer.

 

While i try to imput what you created for me nothing happened. So i am wondering if i did it right.

Went into button 4 

 

And then i paste the code and nothing happened:(

 

WardenburgCorrect answer
Inspiring
January 24, 2020

Ah the checkboxes dont have the confirm tab, see this example instead of how Id do this then

 

https://we.tl/t-T4ow7ihmOu