Check out the LimeSurvey source code on GitHub!

Default date, based on token

More
5 years 2 weeks ago - 5 years 2 weeks ago #73715 by fransmarcelissen
Since 1.92RC3 date fields can have defaults (Great!). It took me some time before I understood the date in the default should be entered as 1980.05.15 and not as 10.05.1980, as is usual.
More important: I tryed to set the default on a token value: {TOKEN:ATTRIBUTE_6} (i.e. the date of birth). However, the value always becomes 30.11.1999, even if the token is entered as 1952.05.10, or 10.05.1952
Am:blush: I doing something wrong? Or is this a bug I should report?
Thanks,
Frans
Last Edit: 5 years 2 weeks ago by fransmarcelissen.

Please Log in to join the conversation.

More
5 years 2 weeks ago #73717 by TMSWhite
It should work. Since it isn't please report a bug, and attach a survey that lets us easily reproduce the problem. Feel free to make the bug report private if you don't want anyone but developers to be able to see your survey.

Please Log in to join the conversation.

More
5 years 2 weeks ago #73720 by fransmarcelissen
I'll do. I will add a test survey.
Thanks
Frans

Please Log in to join the conversation.

More
5 years 2 weeks ago #73722 by TMSWhite
Frans-

There were two problems:
(1) Bug in LS, fixed in revision 12361 (so will be in 1.92 RC4)
(2) Dates in default values (or {TOKEN:ATTRIBUTE_X} in your case), need to be in the format yyyy-mm-dd. That is the internal storage representation.

/Tom
The following user(s) said Thank You: fransmarcelissen

Please Log in to join the conversation.

More
5 years 2 weeks ago #73723 by fransmarcelissen
Thanks.
I am looking forward to RC4.
Frans

Please Log in to join the conversation.

More
5 years 2 weeks ago #73748 by Mazi

fransmarcelissen wrote: Thanks.
I am looking forward to RC4.
Frans

You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form