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

  1. Papouck
    Posted 3 years ago #

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

    (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?


  2. Papouck
    Posted 3 years 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
    Posted 3 years 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?


  4. ifsabutlerweb
    Posted 3 years ago #

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

  5. codeAddict
    Posted 3 years 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
    Posted 3 years 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. codeAddict
    Posted 3 years 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
    Posted 2 years 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
    Posted 2 years 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

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic