Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Sebastian Fischbach
  2. F2C submission form templating
  3. Monday, 10 June 2019
  4.  Subscribe via email
Hello everyone!

I have a question regarding the date format in date fields. I understand that I can modify the field's output through Smarty into any desired date format. However, this doesn't apply in the submission form template. In the F2C global configuration I can choose between three date formats, but none of the equals "DD.MM.YYYY" which I require. Consequently, when I pick a date in the submission form, it is formatted with dashes instead of dots. Is there any way to change date format in the submission form (aside from chosing between the three options in the global configuration)?

On a side note: the date input field should be formatted as type="date" instead of "text" to enable matching controls on mobile devices - this would also eliminate the need for the selfmade date-picker in modern browsers. (see for example https://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_date)

Best regards,
Sebastian
Responses (5)
Accepted Answer Pending Moderation
Hi Sebastian,

Thanks for your feedback. I will ask Julien to have a look as this is beyond my knowledge to be able to change.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Hello Sebastian,

The reason we don't use a html5 date picker (yet), is because we want to stick as close as possible to the regular Joomla controls. Our date picker is a modification based on the Joomla date picker that you can find in the back-end.

Currently we don't support the dot as a date separator yet. For that we need to modify our client and server side processing functions. I know that the dot is a common separator in the German language.

I will have to take a look to see if that's possible, but it's not something I can fix on short terms, because we're now very busy preparing for J4!

best,
Julien
Accepted Answer Pending Moderation
Hey Patrick, hey Julien,

thanks for your explanation! I'm looking forward to switch to dots once the J4 migration ist done! Until then my website's visitors will hopefully manage to deal with dashes. ;) Thanks for your work!

Best regards,
Sebastian
Accepted Answer Pending Moderation
Hello Sebastian,

I have developed this request for the next version of F2C (both Lite and Pro).
We are now testing these versions, they are not stable yet.
But you know it is on the way!

best,
Julien
Accepted Answer Pending Moderation
Hey Julien,

thank you - I appreciate your work! I found a temporary workaround in the meantime:


  1. replaced the Smarty-variable with an input-type-date HTML5 field (ID, name and so on copied from the HTML source generated by F2C)
  2. changed date format in F2C global options to Y-m-d


Apparently, the HTML5 datepicker field shows the date to the user according to the browser's locale but submits it in YYYY-MM-DD format. This way my users see the "german" date format bus F2C receives the date format it expects.

Anyway, thanks for the upcoming more permanent and non-improvised solution. :)

Best wishes
Sebastian
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.