1

I need to format a birthday submission value to the short format (01.01.2015) defined under admin/config/regional/date-time on a webform.

This Token is working but it uses the long format (Fr, 01/01/2015):

[submission:values:bday]

I tried the following token variations :

[submission:values:bday:short]  
[submission:values:bday:custom:short]
[submission:values:bday:custom:d.m.Y] 
[submission:values:bday:date:short]

But none of them submits my desired output. Any Ideas?

3

I finally found a answer myself. Instead of changing the date format tokens you can set the date format globally for webforms under admin/config/content/webform.

|improve this answer|||||
0

You could change it server side with a datetimeformatter or client side. Also if you'd like these kind of things often, you can take a look at moment.js

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.