Search

How can I save the date & time an entry is created through the front-end, without outputting it in the form's html? I've tried the reflection field, but it seems {$today} {$current-time} doesn't work there (either because it's in the frontend, or because these variables are not supported).

Thanks in advance!

Two ways: Every entry has an invisible date field that will be returned in the XML. You can't access or modify that data in the backend though.

Second, probably preferable, way: Set the field to "prepolulate with todays date" and simply leave out the field in the form. The field will be set to the current date and time.

To absolutely make sure nobody is illegally injecting false data by guessing the field name you can make sure the value is removed in the event PHP (see workspace/events/<yourevent>.php) using

unset($_POST['fields']['date']);

Thanks (sorry for the late reply). I wonder how I didn't see that prepopulate checkbox!

Two ways: Every entry has an invisible date field that will be returned in the XML. Second, probably preferable, way: Set the field to "prepopulate with todays date" and simply leave out the field in the form. The field will be set to the current date and time.

Can't seem to figure out any of these. There's neither another date attrib on each entry, nor a configurable way to hide an input on the backend.

Any other ideas on how to get a hold on an entry's system date from the XSLT?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details