WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] date format in mailtags (9 posts)

  1. Papouck
    Member
    Posted 1 year ago #

    Hi,
    I'm looking for a way to change the date format in the

      mail
    (submission date)
    [_date] always comes out the American way.
    I've tried things like [_date format dd-mm-yyy] but that doesn't work.
    Anyone got an idea?

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Papouck
    Member
    Posted 1 year ago #

    Okay, now I feel really stupid ;(
    I thought this was something of contact-form 7, but I only had to change my general WordPress settings.
    Sometimes, you're just to focussed to see what's all about.

  3. ifsabutlerweb
    Member
    Posted 1 year ago #

    Hi Papouck-

    So was the general settings date format the only thing you had to change? The validation wants me to format like: YYYY-mm-dd, just as the documentation says. I changed the general settings, as you mentioned, to the order that I would like: m/d/Y and the form validation still says, "Date format seems invalid.", when entering something like 05/21/2011 or 05-21-2011.

    This is my form shortcode now: [date* student-dob]

    Any ideas or additional steps?

    Thanks!

  4. ifsabutlerweb
    Member
    Posted 1 year ago #

    Seems that HTML5 support for cross-browser functionality is not there across the board, so I'll hold off on using [date].

  5. LeeHarris
    Member
    Posted 1 year ago #

    Apologies, i know this was marked as resolved... but nothing seems to work for me.

    I am trying to get the date format as dd-mm-yyyy in the email that is received (showing correctly on the web form as dd-mm-yyyy).

    I have changed the general wordpress settings and used "date format" in the shortcode but it still shows as yyyy-mm-dd in the email we get?

    Cheers ;o)

  6. buzztone
    Member
    Posted 1 year ago #

    Refer http://contactform7.com/date-field/ - DD-MM-YYYY format is clearly not supported.

    The new CF7 date tag is a HTML5 date input type which currently has only limited cross-browser support. See http://www.wufoo.com/html5/types/4-date.html for the low down on this new HTML5 form element.

  7. LeeHarris
    Member
    Posted 1 year ago #

    Thanks buzztone, although i am aware that the date tag has only limited support, i was testing using a browser that does. My apologies though...i completely missed the bit that said you could only have YYYY-MM-DD format using this html5 tag. I just assumed that they wouldn't be so daft as to only have one date format?!

  8. roddrigoo
    Member
    Posted 3 months ago #

    Try this:

    In your body message, replace [YOUR-NAME-DATE] for [_format_YOUR-NAME-DATE "D, d M y"]

    Works to me!

  9. Howdy_McGee
    Member
    Posted 2 months ago #

    I tried that @roddrigoo but it doesn't do anything except spit out the tag in the email:

    Schedule Date: [_format_ scheduled-date "D, d M y"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic