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.

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

Forms and result messages in modal box

More
9 years 7 months ago #1508 by mperezayala
Forms and result messages in modal box was created by mperezayala
Hello again.
Only a little enhacement. If you want to open the form in a modal windows, you can add the modal class to a link to the forms page and then add &tmpl=component too for show nothing but the form.
The problem is that when submiting the form, the messages url that inform us that the form was successfully/unsuccessfully send is hardcoded on controller.php and does not honour the existence of the &tmpl=component url param.

Here you have a diff from the original controller.php file and a modified one that respects this url param.
Code:
--- controller.original.php 2015-03-31 09:53:18.197815731 +0200 +++ controller.php 2015-03-31 10:32:10.242415655 +0200 @@ -243,9 +242,13 @@ else if ((isset($visform->redirecturl) == false || $visform->redirecturl == "") && ((isset($visform->textresult) == true && $visform->textresult != ""))) { + $input = JFactory::getApplication()->input; + if ( $tmpl = $input->get('tmpl','') ) { + $tmpl = "&tmpl=" . $tmpl; + } $message = JHTMLVisforms::replacePlaceholder($visform, $visform->textresult); $app->setUserState('com_visforms.form' . $visform->id . '.message', $message); - $this->setRedirect( "index.php?option=com_visforms&view=visforms&layout=message&id=".$visform->id); + $this->setRedirect( "index.php?option=com_visforms&view=visforms&layout=message&id=".$visform->id . $tmpl); } else {

You need too to include an override template of visforms form to include the url param &tmpl=component or a hidden input field named tmpl and with "component" as value for this to work when sending form.

More
9 years 7 months ago #1512 by Administrator AV
Replied by Administrator AV on topic Forms and result messages in modal box
Hi,

thanks for your information.
I will check on your suggested code changes.

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 :-).

More
9 years 7 months ago #1557 by Administrator AV
Replied by Administrator AV on topic Forms and result messages in modal box
Hi,

sadly I have not had the time to test this yet so the changes are not part of Visforms 3.4.3 which I released today as a bugfix.
One reason is, that I think, I have to implement this for the data view as well and I have to test thoroughly (for example that this works properly, too, if the form fail during php validation and is displayed again), which takes some time.

But It's on my list an will come :)

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 :-).

More
9 years 6 months ago #1575 by Administrator AV
Replied by Administrator AV on topic Forms and result messages in modal box
Hi,

finally I was able to add some new features to Visforms and released Visforms 3.5.0 as a beta.
I implemented the tmpl=component feature and using the form in a modal window will now work even if the php form validation fails and the form is displayed again (including the php error messages). Result texts are displayed in the modal window properly as well.

It's of course necessary to have the proper CSS for modals in the template.

As this is a beta, you will not be informed via backend update manager but if you are interested you can download the release our downloads section.

Kind regards and good evening,
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 :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum