Joomla 6 Notice

We are pleased to announce that all our Joomla extensions have been compatible with Joomla 6 since October 14th, 2025.

For those currently upgrading from Joomla 3 to 4: Instructions for Joomla 4 migration can be found here:

There are standalone documentations Visforms Joomla 4, Visforms Joomla 5 and Visforms Joomla 6.

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.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

JavaScript in Frontend Webassets aus Version 5 funktioniert in V6 nicht mehr

More
2 weeks 1 day ago - 2 weeks 1 day ago #12435 by MaliRaj
Hallo Aicha & Ingmar,
ich nutzte bisher JavaScript (hier in Daten-Edit) innerhalb von  $(document).ready(function() {} u.a. in der Art:
Code:
//    nach Initialisierung des Formulars und der Feldwerte     $('.visform').on('visformsInitialised', function() {         console.log('visformsInitialised ready'); // Kontrollausgabe
und 
Code:
   // Syntax berechnen beim Abschicken des Formulars     $('#visform4').on('submit', () => updateSyntax());

Beides funktioniert nach Update auf Joomla 6.21, Visforms Version 6.2.0, Subscription Version 6.2.0 nicht mehr. Unter Joomla 5.4.7 funktionierte das bisher fehlerfrei. Da andere Funktionen innerhalb der gleichen $(document).ready(function() funktionieren, gehe ich davon aus, dass sich die Events wohl geändert haben, oder?

Freundliche Grüße aus PM
Heinz
(Joomla 6.2.1 / Visforms+Subscription 6.2.0 / PHP 8.3)
Last edit: 2 weeks 1 day ago by MaliRaj.

More
2 weeks 1 day ago - 2 weeks 1 day ago #12438 by Administrator IV
Hallo Heinz,

Exakt.

Mit dem Refactoring vom visforms.js zu nativem JavaScript werden Events jetzt als native JavaScript-Events erzeugt und nicht länger als spezifische jQuery-Events.
Das Event wird infolgedessen nicht länger an '.visform' gebunden und '.visform' wird dadurch 'zu eng'.
Der alte Code funktioniert mit dieser Art von Bindung daher nicht mehr.

Notwendige Änderung am Code:
Code:
von jQuery: jQuery('.visform').bind('visformsInitialised', function() { ... } ); nach nativ: document.addEventListener('visformsInitialised', () => { ... } );


Optionale Änderung am Code:
Code:
von jQuery: jQuery(document).ready(function() { } nach nativ: document.addEventListener('DOMContentLoaded', () => { ... } );


Liebe Grüße, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/en/docs/
Please ask only 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/docs/
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 2 weeks 1 day ago by Administrator IV.
The following user(s) said Thank You: MaliRaj

More
2 weeks 1 day ago - 1 week 5 days ago #12444 by MaliRaj
Perfekt, Danke Ingmar, damit funktioniert das Einbinden der Scripte wieder. Ein weiteres/anderes(?) Problem verschiebe ich in eine neue Anfrage.

Freundliche Grüße aus PM
Heinz
(Joomla 6.2.1 / Visforms+Subscription 6.2.0 / PHP 8.3)
Last edit: 1 week 5 days ago by MaliRaj.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum