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?

I want to write a function into controller

More
8 years 1 month ago #3615 by cloudyHuang
I want to write a function into controller was created by cloudyHuang
HI,Aicha
I want to customize a function inside the controller,
In the test,I deleted “defined('_JEXEC') or die( 'Restricted access' );”in site/components/com_visforms/controllers/visforms.php,
And I can see the verification code when i enter "http://localhost/index.php/pg?option=com_visforms&task=captcha" in the browser.
So I added the following code to site / components / com_visforms / controllers / visforms.php
public function progress(){
echo "abc";
echo "<script>alert('abc');</script>";
}

Then visit function progress through "http: //localhost/index.php/pg? option = com_visforms & task = progress“
unfortunately,The page only displays the home page(http: //localhost/index.php/pg), without any other output information about "abc"。
Therefore, I would like to ask whether I have done some wrong settings, resulting in inaccessible function progress, how do I access my function progress
Thinks

More
8 years 1 month ago - 8 years 1 month ago #3616 by Administrator AV
Replied by Administrator AV on topic I want to write a function into controller
Hi,

never ever delete defined('_JEXEC') or die( 'Restricted access' ); in a Joomla! file!!!
It is no good idea to change functions in the controller.
It looks to me, that you have no idea what you are doing, that is why it is not working.
You cannot just echo something in the controller.

Actually I added a possibility display some "work in progress" test in Visforms, which is displayed inside the page where the form was display after the form was submitted until the submit process is complete and the user is redirected to the result page. This is a feature of the latest release of the beta version 3.8.9. I think this is what you are looking for. You can enter a text, or an image (for example an animated image) as "work in progress text".

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 :-).
Last edit: 8 years 1 month ago by Administrator AV.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum