Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Ocultar / mostrar página com checkbox

Participant ,
Feb 03, 2023 Feb 03, 2023

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

TOPICS
How to , JavaScript , PDF forms
974
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2023 Feb 03, 2023
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 03, 2023 Feb 03, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 17, 2023 Feb 17, 2023
LATEST

Boa tarde BarlaeDC

Obrigado pela resposta, mais tenho duas perguntas:

- Ao adiconar a página ela ira buscar os dados preenchidos na primeira se os campos estiverem com o mesmo nome?

- Sabe me dizer se existe algum modelo ou video que eu possa ver como se faz?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines