"Today" as default value in date field (form)  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
User avatar
siSINka
User
Posts: 40
Joined: Sun Apr 07, 2019 11:55 am
Location: Czech Republic

"Today" as default value in date field (form)  SOLVED

Post by siSINka »

I have a form with date field. Can I set "variable" default value instead of "hard" date?
No (for example) "25.04.2019" but something as (as in MS Excel) =today() ?

..with required result in form: today "25.04.2019", tomorrow "26.04.2019" etc.
(date format dd.mm.yyyy)

In software manual I only read:
The Options properties determine additional options for date fields:

•Alignment determines the text alignment within the date field.

•Default Value determines the default value of the date field. Date fields will show this value by default. If they are edited and then reset then the value entered for this property will be displayed.
Thanks for help.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: "Today" as default value in date field (form)

Post by Will - Tracker Supp »

Thanks Lev!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
User avatar
siSINka
User
Posts: 40
Joined: Sun Apr 07, 2019 11:55 am
Location: Czech Republic

Re: "Today" as default value in date field (form)

Post by siSINka »

Thanks!

I used "stamp hint" and added to my form Text Field with no format, no action, but with Value Calculation - Custom Action and JavaScript

Code: Select all

var d = new Date;
event.value = util.printd("dd.mm.yyyy", d);
(dd.mm.yyyy is my needed format of date, today is 26.04.2019)

When I open pdf form, actual date is filled.

Problem solved :D
Last edited by siSINka on Fri Apr 26, 2019 3:02 pm, edited 1 time in total.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: "Today" as default value in date field (form)

Post by Will - Tracker Supp »

:D
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Post Reply