Skip to content

Commit

Permalink
feat(formanswer): hook before generating targets
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienClairembault authored May 16, 2022
1 parent d8c7669 commit 8542adc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,8 @@ public function post_addItem() {
$this->sendNotification();
$formAnswer = clone $this;
if ($this->input['status'] == self::STATUS_ACCEPTED) {
Plugin::doHookFunction('formcreator_before_generate_target', $this);

if (!$this->generateTarget()) {
Session::addMessageAfterRedirect(__('Cannot generate targets!', 'formcreator'), true, ERROR);

Expand Down

0 comments on commit 8542adc

Please sign in to comment.