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

Auto-add calendar picker field to all fields called "Date" in a form (set as a preference?)

New Here ,
Mar 18, 2025 Mar 18, 2025

When I select the "Prepare a Form" tool to turn my document into a fillable form, I would like Adobe to recognize all fields called "Date", so it knows to automatically put a calendar date-selector (with my preferences set) in that area. Is this possible? #form #field #calendar #date #picker #selector

TOPICS
How to , JavaScript , PDF , PDF forms
160
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 ,
Mar 18, 2025 Mar 18, 2025

Hello,

 

It's a very common desire to have Adobe Acrobat automatically recognize and apply specific field types, like date pickers, based on field names. While Adobe Acrobat's "Prepare Form" tool does have automatic field detection, it doesn't always perfectly interpret every desired field type based solely on the field name "Date."

Here's a breakdown of what's possible and what limitations exist:

Automatic Field Detection:

Adobe Acrobat can automatically detect potential form fields, including areas that look like they should contain text.
However, relying solely on the word "Date" to trigger a calendar date-selector consistently might not always produce the desired result. The automatic detection is based on a complex analysis of the document's layout and content.
Achieving the Desired Outcome:   SunPass com

To ensure that you consistently get date-selector fields, you'll likely need to do some manual adjustments:

Manual Field Placement:
After using the "Prepare Form" tool, review the detected fields.
Where a "Date" field should have a date-picker, manually replace or adjust the field type to a date field. Adobe Acrobat does have the ability to insert date fields.
Within the date field properties, you can then set your preferred date format.
Javascript:
For more advanced automation, you could use JavaScript within your PDF form. This would allow you to create scripts that:
Identify fields with the name "Date."
Apply specific date formatting or date-picker functionality to those fields.
This is a more advanced action, but it gives the most control.
Adobe Acrobat Sign:
Adobe Acrobat Sign has improved automatic field detection, and better handling of date fields, especially when working in a digital signature workflow.
Key Considerations:

Consistency: Ensure that your "Date" labels are consistently formatted throughout your document. This can improve the accuracy of automatic field detection.
Field Properties: Always review and adjust the properties of your date fields to ensure they match your desired format and behavior.

 

 

Best Regards

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 ,
Mar 19, 2025 Mar 19, 2025
LATEST

Dear AI,

This was not helpful as I already know or do all those things. The only helpful part was the allusion to using Javascript, but instructions would've been most helpful. I appreciate JR's answer, below, as he was direct, to-the-point, concise, and provided the exact answer I needed without fluff. Humans still rule. 🙂

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 ,
Mar 19, 2025 Mar 19, 2025

Run this script form the JS Console:

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

	var oFld = this.getField(this.getNthFieldName(i));
		if ((oFld.type == "text") && (/date/.test(oFld.name))) {
		oFld.setAction("Keystroke", "AFDate_KeystrokeEx(\"dd/mm/yyyy\")");
		oFld.setAction("Format", "AFDate_FormatEx(\"dd/mm/yyyy\")");
	}
}

It adds the format dd/mm/yyyy to all text fields whose name contains “date”.
You can change the date format and the character string to be searched in the field names.

 

How to use the JS Console: https://acrobatusers.com/tutorials/javascript_console/


Acrobate du PDF, InDesigner et Photoshoptographe
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