- Posts: 21
COMMUNITY FORUM
frontend edit changes creation date
- Sebastian van Greunen
-
Topic Author
- Offline
- Junior Member
Less
More
13 years 8 months ago #99665
by Sebastian van Greunen
frontend edit changes creation date was created by Sebastian van Greunen
I have set category list views to shoe the creation date. I have noticed that if an item is edited from the frontend form, the creation date is changed along with the modified date. Seems a bit wierd, no?
I don't want every edited item to show as a new item as it defeats the point of latest items.
how can this be changed? thanks
I don't want every edited item to show as a new item as it defeats the point of latest items.
how can this be changed? thanks
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
13 years 8 months ago #99666
by Jiliko.net
Replied by Jiliko.net on topic frontend edit changes creation date
Hi Sebastian,
I think it's because the creation date field is not in your frontend form (customization) and as it's not set when the item is saved, it's automatically set with the current date/time.
Just add a hidden field in the frontend form with the current item creation date as value...
Olivier
I think it's because the creation date field is not in your frontend form (customization) and as it's not set when the item is saved, it's automatically set with the current date/time.
Just add a hidden field in the frontend form with the current item creation date as value...
Olivier
Please Log in or Create an account to join the conversation.
- Sebastian van Greunen
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
13 years 8 months ago #99667
by Sebastian van Greunen
Replied by Sebastian van Greunen on topic frontend edit changes creation date
Hi Olivier
I tried this:
<input type="hidden" name="date" value="<?php echo JHTML::_('date', $this->item->created); ?>" /> and placed it with the rest of the hidden fields at the bottom.
this does not change anything. Is my code not correct?
I tried this:
<input type="hidden" name="date" value="<?php echo JHTML::_('date', $this->item->created); ?>" /> and placed it with the rest of the hidden fields at the bottom.
this does not change anything. Is my code not correct?
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
13 years 8 months ago #99668
by Jiliko.net
Replied by Jiliko.net on topic frontend edit changes creation date
Sebastian,
the name field value should be "created", not "date" :
<input type="hidden" name="created" value="<?php echo JHTML::_('date', $this->item->created); ?>" />
Olivier
the name field value should be "created", not "date" :
<input type="hidden" name="created" value="<?php echo JHTML::_('date', $this->item->created); ?>" />
Olivier
Please Log in or Create an account to join the conversation.
- Sebastian van Greunen
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
13 years 7 months ago #99669
by Sebastian van Greunen
Replied by Sebastian van Greunen on topic frontend edit changes creation date
Hi Olivier i have noticed that all items added in the frontend have the correct date, but the time is set to 00:00 for all the items, so the latest item order is thrown out. Does this need another hidden field or does the format of the creation date need to be changed. When I modify the items in the admin backend, the time updates correctly.
Thanks
Thanks
Please Log in or Create an account to join the conversation.