Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Userforms date formatting


Go to End


2 Posts   1135 Views

Avatar
mattems

Community Member, 1 Post

17 June 2011 at 6:02pm

Hey All,

I am trying to change the format of the date that is sent via email once a form is submitted.

The field is Date Field.

Im wanting the email to show: January 15th 2011 (for example) instead of the US format.

Thanks in advance guys.

ps. im a total noob with silverstripe.

Avatar
swaiba

Forum Moderator, 1899 Posts

18 June 2011 at 4:39am

Edited: 18/06/2011 4:39am

from the header of my
userforms\code\editor\EditableDateField.php

 * @todo Localization, Time Field / Date time field combinations. Set ranges of dates,
 * 		set default date

however, if I were to start hacking, it would be around here...
userforms\code\UserDefinedForm.php

function process($data, $form) {
...
//somewhere here it builds an email content so I'd change the one thing I am intrested in before it sends it
...
$email->send();	
...
}