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

Can not hide default values in interactive text fields on smartphones pdf browsers

New Here ,
Nov 06, 2022 Nov 06, 2022

Hello, I have pdf created in indesign with interactive text fields and checkboxes. Then in "Adobe pro" I defined default values for those text fields and "Will print" script, so that default values are not printable, if form fields are not filled with text. Interactive fields in form works perfect on PC/MAC, but doesnt work on smartphones (iOS) - text fields can not be edited, so form is only printable. Thats not problem at all. Problem is when someone want to print it with blank fields - default values stays there, because script "will print" does not work on smartphone. Is it be possible to define default values to be visible only on compatible pdf browsers? Or someone have any other solution for my problem?

 

Script for "will print"

 

for(var i=0;i<this.numFields;i++)

{ var oFld = this.getField(this.getNthFieldName(i));

if(oFld.type == "text") oFld.display = (oFld.value == oFld.defaultValue)?display.noPrint:display.visible;

}

 

Peter

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript , PDF forms
462
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 ,
Nov 06, 2022 Nov 06, 2022

Almost not scripts will work on mobile devices, unfortunately.

You can try it using PDF Expert by Readdle, but that's about your only option.

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 ,
Nov 15, 2022 Nov 15, 2022
LATEST

You may need to add a condition to clear the fields.

 

Hiding and unhiding a field doesn't clear the value in the hidden field.

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