While the events provided by the entity module can be used to react to insert and update of a submission, it is currently difficult to react to an insert/update during which a submission loses its draft status. Two rules are required (each for insert and update), and a comparison of the draft property on $entity and $original is necessary.

To make it easier for users to perform actions (like sending mails) once a submission reaches its final form, a rules event should be provided that triggers on one of the following scenarios:

  • A new entityform has been created and is not in draft.
  • An existing entityform has been updated and changed its draft property from true to false.

Comments

ciss created an issue. See original summary.

ciss’s picture

Status: Active » Needs review
StatusFileSize
new1.55 KB
kris77’s picture

@ciss How can i use it ?

bacon’s picture

StatusFileSize
new1.51 KB

Thanks for the patch. For me, the $entityform and the $entityform_unchanged both had the same value for draft after submit, but I found the $entityform->original object to have the previous draft status which caused the event to be invoked, so I'm rolling this patch for myself and for anyone else to evaluate.

kris77’s picture

@bacon can you, please, explain to me how to use this action: "After an entityform submission leaves draft status" ?

Thanks.