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

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

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

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 » Thu Apr 25, 2019 5:20 pm

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: 6826
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 » Fri Apr 26, 2019 8:45 am

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 » Fri Apr 26, 2019 10:32 am

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: 6826
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 » Fri Apr 26, 2019 12:35 pm

: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