Auto Populate Hidden Date Field For Statistics

Plus d'informations
il y a 1 mois 19 heures #187968 par ixtambay
Hi everyone!

I would like to ask if there is a way to auto populate a date field that is hidden so that when I view the statistics a date field would appear under response filters?

Thanks in advance!

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 mois 12 heures - il y a 1 mois 12 heures #187972 par Joffm
Hi,
Unfortunately I was not successfull in entering something dynamic into the default answer option,
I used an equation to populate the date question.
Both hidden:
1. equation: {MyDate=date("Y-m-d")}
2. Hidden date question with code "MyDate"

And you have a date field in the response filter


Joffm

If you are going to populate with some other than the actual date, please tell us.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Dernière édition: il y a 1 mois 12 heures par Joffm.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 10 heures - il y a 1 mois 10 heures #187977 par DenisChenu
For default value : {date("Y-m-d")} for date of today

With all data format. Since default value is set in PHP : must be SQL date

For another day/date : play with strtotime is the most easy.

For example : {date("Y-m-d",strtotime("tomorrow"))}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Dernière édition: il y a 1 mois 10 heures par DenisChenu. Raison: {date("Y-m-d",strtotime("tomorrow"))}

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 6 heures #187986 par Joffm

For default value : {date("Y-m-d")} for date of today


Of course, I missed the curly brackets.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 6 jours - il y a 3 semaines 6 jours #188104 par ixtambay
Thanks a lot sir Joffm and sir DenisChenu.

However, after trying it, the statistics shows the date (just like in the photo above) but why doesn't it save the date in the date field when I view it under survey responses.
Dernière édition: il y a 3 semaines 6 jours par ixtambay.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 6 jours #188122 par Joffm
Hi, most probably you looked at the wrong place.

This value is stored.

It is stored exactly with the code of your "date" question.

Otherwise it couldn't be displayed in the statistics.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Les utilisateur(s) suivant ont remercié: ixtambay

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!