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.

Page is jumping directly to form

More
8 years 8 months ago #1887 by vinayreddy
Page is jumping directly to form was created by vinayreddy
Dear Admin ,

I am very happy that your extension is the best one compared to many others for the forms in Joomla.

I need a small help from regarding an issue.
When I load a page it is directly jumping to the form and the header is not shown. Please help me out of this issue.

I shall give you the link

hanivisu.com/dreamindia/index.php/admiss...your-friend-relative

More
8 years 8 months ago #1888 by Administrator AV
Replied by Administrator AV on topic Page is jumping directly to form
Hi,

this is not due to Visforms itself. Visforms before 3.4.1 did set the focus to the first form field even if the form was displayed in a module. But I removed that "feature" and in the Visforms Version which you use on your Website it is not Visforms itself which sets the focus to the first form field.

There is a script tag in your document head tag with the following code.
Code:
jQuery(document).ready( function(){jQuery("#field202").focus();});

I don't know whether it is a custom plugin on your website or some code that comes from your template, but it is this javascript that causes your problem and it is not added by Visforms.

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
8 years 8 months ago #1889 by vinayreddy
Replied by vinayreddy on topic Page is jumping directly to form
Hi Admin,

I searched the entire code and found this code comes from your component.

$script= '';
$script .= 'jQuery(document).ready( function(){';
$script .= 'jQuery("#'. $field->errorId.'").focus();';
$script .= '});';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($script);
$this->firstControl = false;


and this code is in three pages of your component

component/com_visforms/views/visforms/tmpl/default_visforms.php

component/com_visforms/views/visforms/tmpl/default_btdefault.php

component/com_visforms/views/visforms/tmpl/default_mcindividual.php

More
8 years 8 months ago #1890 by Administrator AV
Replied by Administrator AV on topic Page is jumping directly to form
Hi,

yes that is correct.
These are the view files which are used, when you use a menu item to display Visforms, which your are not doing.
You use Visforms in a module. And as you have confirmed correctly, there is no such code in the files in the modules/mod_visforms/tmpl folder (which are used, when you display Visforms in a module).

As I said, the script tag, which is created in the head tag of your website does not come from Visforms.

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
8 years 8 months ago #1891 by vinayreddy
Replied by vinayreddy on topic Page is jumping directly to form
Dear Admin,

I am using to display for menu item

I am not using in module.

Please rectify this.

More
8 years 8 months ago #1892 by Administrator AV
Replied by Administrator AV on topic Page is jumping directly to form
Hi,

ok, maybe I was a bit tiered yesterday, when I looked at your form.
After checking the source code of your website I thought you were using Visform in a module.
But after checking once again I can confirm everything your figured out. And yes the focus is set by Visforms itself.

I will not change the code for the form view with a menu item, because setting the focus was I highly wanted feature request. In most cases it is useful to have the focus on the first form field because usually the form (when used with a menu item) is at the top of the page and you can see everything above quite well. Maybe I will add a form option to disable the focus setting sometimes in the future, but I'm not sure about that.

But it is always possible to create an override of the view file in your template and uncomment the code which you have posted here in that override. I think this is a good solution in your case.

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 :-).
The following user(s) said Thank You: vinayreddy

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum