Skip to main content
Inspiring
February 3, 2023
Question

Ocultar / mostrar página com checkbox

  • February 3, 2023
  • 1 reply
  • 1095 views

Possuo um formulário que conforme o checkbox selecionado ocultasse ou exibisse as páginas para preenchimento.

This topic has been closed for replies.

1 reply

BarlaeDC
Community Expert
Community Expert
February 3, 2023
Inspiring
February 3, 2023

Talvez não soube me expressar direito.

imaginemos que tenho um checkbox com a opção casado SIM ou NÃO.

caso selecione SIM a página para preenchimento dos dados do cônjuge é exibida, se colocar NÃO a página permanecerá oculta e também não imprimi.

gostaria de fazer com JavaScript.

 

logica:

 

If checkbox1 = true{

page1.show;

elseif

page1.hide;

end if

BarlaeDC
Community Expert
Community Expert
February 17, 2023

Hi,

 

So you create the page as you would like, turn it into a template, which you hide and then you can use spawn method to show the page, and if the user changes their mind you can use the deletePages method to remove it, there is not really a way to show and hide a whole page in a PDF, so we have to come up with workarounds.

 

You could also use JavaScript to store the information contained in the template before you delete it, which would enable you to put it back if they changed their mind again. (although this may be beyond what you want to do)

 

Apologies if this is not what you wanted but it is the only method I can think of to get the functionality you would like.