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

How to automatically change numbers (05152024) to date format (05/15/2024) in Adobe forms

New Here ,
May 15, 2024 May 15, 2024

Copy link to clipboard

Copied

Hey Adobe Community!!! Thanks for always taking the time for people like me who don't know anything! 😉

How do I make numbers automatically change to date format Adobe forms?

 

For example typing: 05152024 I want it to automatically change to 05/15/2024 format


I already did the "change the "Format" tab in the properties to Date format.. I'm in the tab where I need to make it a "custom " format.
I want to know if there is a "code" or some script to make it auto-populate to date format.

Also is there a way to have a text field box automatically set it to be today's date?


Thanks a lot for all your help, time, and knowledge in advance!

TOPICS
How to , JavaScript , PDF forms

Views

60

Translate

Translate

Report

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 ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

Still lost with this. Please advise!

Votes

Translate

Translate

Report

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 ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

Try this as custom format script:

var input = event.value;
if (/^\d{8}$/.test(input)) {
var month = input.substring(0, 2);
var day = input.substring(2, 4);
var year = input.substring(4, 8);
        
event.value = month + "/" + day + "/" + year;}

Votes

Translate

Translate

Report

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 ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

LATEST

YOU ARE THE BEST!!!!!!!!!!!!! THANK YOU!!!!!!! That worked!!!! arinarinarin_2-1715890551262.pngarinarinarin_0-1715890544113.pngarinarinarin_1-1715890549254.png

 

Also, Is there a script for automatically generating the date when they fill out the form and then maintaining that specific date once signed?

 

Votes

Translate

Translate

Report

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