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

Setting conditionally 'hide/show' fields overriding 'Visible but not printable' setting

Contributor ,
Jul 02, 2023 Jul 02, 2023

I have a form with a couple of fields I've set to conditionally show/hide with an if/else argument. Some of these fields I've also set to 'Visible but not printable'. These fields, when conditionally visible, continue to print. Any way to overcome this by keeping the field's conditional functionality but also not printing? Thank you in advance!- kemper

TOPICS
How to , JavaScript
539
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
1 ACCEPTED SOLUTION
Community Expert ,
Jul 02, 2023 Jul 02, 2023

In your code you need to change their display property to display.noPrint instead of display.visible .

View solution in original post

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 ,
Jul 02, 2023 Jul 02, 2023

In your code you need to change their display property to display.noPrint instead of display.visible .

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
Contributor ,
Jul 02, 2023 Jul 02, 2023

Thank you Try67 for your response! I'm unsure where to make your suggested change. I have a radio button field, when option 2 selected, conditionally displays several fields that I have set to 'Visible but not printable'. If I want to continue to be able to hide/show these fields with the radio button selection, but not have them print regardless of whether they're conditionally 'visible' at form submission, would I exchange the display.visible or display.hidden with display.noprint in the javascript mouse up action of the radio button? Would I lose the capability to conditionally display/hide the target fields? Thank you again Try67!- kemper

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 ,
Jul 02, 2023 Jul 02, 2023

Post your current code, please.

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
Contributor ,
Jul 02, 2023 Jul 02, 2023
LATEST

Hey I played around and figured what you meant Try67- Thank you again for all!!!

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 ,
Jul 02, 2023 Jul 02, 2023

You can read all about it here (including several example scripts):

https://www.pdfscripting.com/public/Hiding-and-Showing-Form-Fields.cfm

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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