WordCamp Europe 2023 Special Offer - Get 30% OFF any edition with coupon: WC30

My Account

Forums

Home Forums General Date formats

Viewing 4 reply threads
  • Author
    Posts
    • #133578
      Jemma
      Participant

      I would like the date to be stored as format ‘yyyy-mm-dd’ but I’d like the user filling in the form to see the Default format ‘August 8, 2022’.

      Is this possible?

    • #133582
      Mark Westguard
      Keymaster

      Hi Jemma

      Dates are stored in the same format that they are entered.

      Many thanks

      Mark

    • #133583
      Jemma
      Participant

      Thanks for the quick reply!

    • #169792
      Howard Jacobson
      Participant

      There is a fairly easy way to do this. Create a visible date field with the format you want the user to see. Create a hidden field with the format you want to use for storing the date. Use one of the _custom WSForm variables to convert the format of the visible field to the format of the hidden field. Put the variable in the default value box of the hidden field. Works for me to store all dates in Epoch format.

    • #170142
      Jemma
      Participant

      Thanks for the suggestion Howard, I’ll give it a go!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.

Login