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

Adding placeholder text to formatted text field

New Here ,
Feb 21, 2023 Feb 21, 2023

Hello,

I have a text field formatted as a "date" or "mmmm d, yyyy" (or for example, "February 21, 2023").

However, I cannot use my normal way of applying placeholder text or that is, the Default Value, as I recieve the error "The defualt value does not match the format (Date) specified". 

 

Is there a simple way to add placeholder texts to a formatted field?

 

Apologies as I am quite new at this - many thanks for any help.

TOPICS
Acrobat SDK and JavaScript , Mac
768
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 21, 2023 Feb 21, 2023

Use tooltip text.

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
New Here ,
Feb 21, 2023 Feb 21, 2023

Thank you - I suppose this would be the easiest way. I was just hoping for visible text (that would not be printed) so that this particular field would not be missed.

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 21, 2023 Feb 21, 2023

You can use a read-only, non-printable text field next to the editable one with the instructional text, and a script to show it when the first field gains focus, and hide it when it loses the focus... Not sure if it's worth the effort of implementing it, though.

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 24, 2023 Feb 24, 2023
LATEST

Hi,

 

++ Adding  to @try67 's  always valuable advice, you should also make the custom date field marked as required and  add a Document Actions script to trigger an message alert if the user miss to fill in the date blank before saving, printing and closing the document.

 

Alert script example (also shown in the first example slide) :

 

 

if (this.getField("Text1").value =="") {

app.alert("Please fill out the required date field", 1);

}

 

 

See example slide below:

 

REQUIRED_DATE_FIELD.pngexpand image

 

 

The result will alert the user like shown below:

 

REQUIRED_DATE_FIELD2.pngexpand image

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