pepperstreet VIP
Total posts: 3,837
11 Dec 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.

Last Modified: 11 Mar 2014

Comments have been disabled for this article and works only in read only mode.

Sergey
Total posts: 13,748
11 Dec 2013 06:04

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


Sergey
Total posts: 13,748
11 Dec 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 Mar 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.

Powered by Cobalt