pepperstreet VIP
Total posts: 3,837
11 Дек 2013 05:22

Hello, just curious about form submissions...

Question:

How to distinguish between initial creation (first save) and edit mode? As far as I know, there is no specific "task" in submission URL. i.e. new, create, edit

Maybe compare initial create date and current date?

Thanks for listening.

Последние изменения: 11 Март 2014

Комментарии были выключены для данной статьи

Sergey
Total posts: 13,748
11 Дек 2013 06:04

Where you want to know it? In the form template?


Sergey
Total posts: 13,748
11 Дек 2013 23:11

$isnew = empty($this->item->id);

If there is no ID then it is new article.


pepperstreet VIP
Total posts: 3,837
11 Март 2014 22:23

Sergey $isnew = empty($this->item->id);

If there is no ID then it is new article.

I see. Might come in handy! You may close this topic.

Работает на Cobalt