Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Edit-Mail: gleicher context wie bei onVisformsEmailPrepare?

More
3 years 8 months ago - 3 years 8 months ago #7026 by MaliRaj
Hallo Aicha, ich dreh mich grad mal wieder im Kreis und finde die Lösung nicht:
Das Event onVisformsEditMailPrepare mit ($context, $mailer, $form) arbeitet meinen Code nicht ab. Soll eigentlich beim Versenden einer Edit-Ergebnismail aufgerufen werden.(Ich will da 'modified_by' mit übermitteln). Scheint so, als ob die Stelle gar nicht durchlaufen wird. Stimmt meine Annahme, dass der Context der gleiche ist wie bei der FormMail? Ich habe das von dort übernommen:
Code:
public function onVisformsEditMailPrepare($context, $mailer, $form) { // Skip plugin if context is wrong $allowedContexts = array('com_visforms.form.receiptmail', 'com_visforms.form.resultmail'); if (!in_array($context, $allowedContexts)) { return true; } $app = JFactory::getApplication(); if ($app->isAdmin()) { return true; } // myCode Anfang $form_id = $form->id; // SubmitHandler aufrufen wenn eine entsprechende Datei existiert // // myCode Ende return true; }

Passt das Event und der context überhaupt?:S

Nachtrag:
Habe ich mir das Event gar "ausgedacht"? So nach dem Motto: das müsste es doch geben.? onVisformsEmailPrepare habe ich jedenfalls schon erfolgreich genutzt. Kann ich dort eventuell zwischen Mail und Edit-Mail unterscheiden?

Freundliche Grüße aus PM
Heinz
Last edit: 3 years 8 months ago by MaliRaj.

More
3 years 8 months ago #7027 by MaliRaj
Der Context vfedit(id) bzw. form(id) dürfte die Lösung sein! Benutze ich ja zur Unterscheidung bei den Events zeitlich früher (BeforeFormSave und BeforeEditSave) auch.

Freundliche Grüße aus PM
Heinz

More
3 years 8 months ago #7028 by MaliRaj
Es ist die Lösung! :cheer:

Freundliche Grüße aus PM
Heinz

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum