Joomla 5 Mitteilung

Wir freuen uns mitteilen zu können, dass seit dem 29. Januar 2024 alle unsere Joomla Erweiterungen mit Joomla 5 kompatible sind.

Für alle die gerade noch von Joomla 3 auf 4 aktualisieren: Anleitungen für die Joomla 4 Migration gibt es hier:

Es gibt nun auch eine eigenständige Dokumentation für Visforms für Joomla 4 und für Visforms auf Joomla 5

Forum

Visforms Subscription Inhaber können in unserem Forum Fragen stellen. Bitte mit dem entsprechenden Benutzer anmelden.
Jeder kann lesend auf das Forum zugreifen.

Bitte stellen Sie nur 1 Frage pro Thema.

Wichtig Angaben für fast jede Frage:
V1: Welche Visforms-Version läuft?
V2: Welche Joomla-Version läuft?
V3: Welche PHP-Version läuft?

Aufgrund von Feiertagen und Urlaub ist bei Anfragen im Forum in der Zeit vom 20. Dezember 2024 bis zum 8.Januar 2025 mit verlängerten Antwortzeiten zu rechnen.

Customizing result mail template

Mehr
4 Jahre 2 Monate her - 4 Jahre 2 Monate her #7093 von arnaudgautron
arnaudgautron antwortete auf Customizing result mail template
Hi,

here is my report :-).

1. Editing result mail with TinyMCE
It works fine. Many restrictions though. As usual in HTML emails, you have to use <table> tags to define the layout properly. The CSS styles must be inline, but it's ok, it's usual with HTML emails.

The main restriction to me is that the email produced by Visforms gives you no access to '<head></head' and '<body></body>' tags of the HTML email. In order to give them classes, I can't use Tiny MCE so I tried another way...

2. Overriding php file
I found that the result mail was defined by a Php file called default.php in 'components/com_visforms/lib/mail/adapter/'. I overrided it this way:
- introducing a var $header='<head><style>insert CSS here</style></head>'; in function result();
- around line 77, I changed the following lines
if (isset($emailsettings)) {
$this->resultmailsettings = $header . '<body>' . $emailsettings . '</body>';
}
- i tested it and it works!

3. IT IS NOT A PROPER JOOMLA OVERRIDE, I know that. Using this method, I will loose my override when upgrading visForms (probably).
So, here are my questions:
- is it possible to add this functionnality to further versions of visForms?
- will upgrade still work in the future if I choose to lock the modified file online (with FileZilla).

Thanks for your answer and your work.

Regards,
Arnaud
Letzte Änderung: 4 Jahre 2 Monate her von arnaudgautron.

Mehr
4 Jahre 2 Monate her #7095 von Administrator AV
Administrator AV antwortete auf Customizing result mail template
Hi Arnaud,

thank you very much for reporting and sharing your results!
I can see that this is akward.
Sorry for that.

I can understand that having the same look and feel in all emails from your website is desirable.
So being able to design to the mails is a feature request which I will support.
Sadly I cannot just add your changes to the Visforms core, because of the fact, that you have to put your custom inline style into the head tag.
I cannot add such custom code to Visforms.

The update save approach to your problem would be to write your own visforms plugin, which implements the onVisformsEmailPrepare($context, $mail, $form) function.
There you can access the $mail->Body and modify it (wrap it the HTML code).

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Mehr
4 Jahre 2 Monate her #7097 von arnaudgautron
arnaudgautron antwortete auf Customizing result mail template
Hi Aicha,

I've created a custom visforms plugin, following the official Joomla documentation and your advice and... it works!
If you're interested in it, I can send you (when its fully ok and tested here) my very first Joomla custom plugin :-)
This is pretty cool (I'm initially a webdesigner, not a coder).

Thank you, I can now add custom CSS to any visForms email, this is great news!

Regards,
Arnaud

Mehr
2 Jahre 1 Monat her #8569 von Shaman
Shaman antwortete auf Customizing result mail template

Hi Aicha,

I've created a custom visforms plugin, following the official Joomla documentation and your advice and... it works!
If you're interested in it, I can send you (when its fully ok and tested here) my very first Joomla custom plugin :-)
This is pretty cool (I'm initially a webdesigner, not a coder).

Thank you, I can now add custom CSS to any visForms email, this is great news!

Regards,
Arnaud

 

Good morning Arnaud,

I'm very interested in your solution!

Could you send it to me please? (Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein.)

Kind regards,
Claude

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum