Hi all,
I tried to create a tabbed form using Joomla 3.1 (Template: Protostar) and Chronoforms 4.0.2. I followed the FAQ "How can I build a tabbed form?" and it works fine. But the
validation does not work correctly. After clicking on the submit-Button it does not show the tab where the field(s) are required (and also no message). Using Joomla 2.5 works as the manual says.
Is this a known issue? How can I fix this?
Thanks
Thomas
I tried to create a tabbed form using Joomla 3.1 (Template: Protostar) and Chronoforms 4.0.2. I followed the FAQ "How can I build a tabbed form?" and it works fine. But the
validation does not work correctly. After clicking on the submit-Button it does not show the tab where the field(s) are required (and also no message). Using Joomla 2.5 works as the manual says.
Is this a known issue? How can I fix this?
Thanks
Thomas
Hi all again,
After a long debugging-Session I found the solution. Therefore I had to change some lines of code in
Chronoforms.
Here is the solution with some explanation:
----------------------------------------------------------------------------------------
1. cfaction_show_html.php
(administrator/components/com_chronoforms/form_actions/show_html/cfaction_show_html.php)
----------------------------------------------------------------------------------------
formcheck-jpane.js is not imported as JPane is deprecated in Joomla >= 2.5
but cfaction_show_html.php checks if joomla.html.pane is imported
--> changed line 245:
if(strpos($form->form_details->content, 'jimport("joomla.html.pane");') !== false
|| strpos($form->form_details->content, 'jimport("joomla.html.html.tabs");') !== false){
----------------------------------------------------------------------------------------
2. formcheck-jpane.js (components/com_chronoforms/js/formcheck/formcheck-jpane.js
---------------------------------------------------------------------------------------
2.1 injectBefore, injectAfter, injectInside is deprecated in MooTools
--> changed to inject(...,"before"), inject(...,"after"), inject(...,"bottom")
---------------------------------------------------------------------------------------
2.2 Browser.Engine is deprecated since MooTools 1.3
--> Changed Browser.engine.trident to Browser.ie (removed Browser.Engine.version
because I didn't find which IE-Versions are using Trident version 5)
---------------------------------------------------------------------------------------
2.3 The message when a field is not correct is empty because it is checked whether the title
of the field is null or not. Her it is not null but an empty string
--> line 45
if(obj.get('title') != null && obj.get('title') != ""){
---------------------------------------------------------------------------------------
2.4 In Joomla 3 an additional dt/dd (with style=hidden) is added in front of the tabs
(in libraries/cms/html/tabs.php), so the wrong tab is opened by ChronoForms
--> changed line 155 of formcheck-jpane.js to select only dt's with the class tabs
parentPanel[0].getParent('div').getParent('div').getFirst('dl').getChildren('dt.tabs').each(function(tab){
I hope this also helps others
Thomas
After a long debugging-Session I found the solution. Therefore I had to change some lines of code in
Chronoforms.
Here is the solution with some explanation:
----------------------------------------------------------------------------------------
1. cfaction_show_html.php
(administrator/components/com_chronoforms/form_actions/show_html/cfaction_show_html.php)
----------------------------------------------------------------------------------------
formcheck-jpane.js is not imported as JPane is deprecated in Joomla >= 2.5
but cfaction_show_html.php checks if joomla.html.pane is imported
--> changed line 245:
if(strpos($form->form_details->content, 'jimport("joomla.html.pane");') !== false
|| strpos($form->form_details->content, 'jimport("joomla.html.html.tabs");') !== false){
----------------------------------------------------------------------------------------
2. formcheck-jpane.js (components/com_chronoforms/js/formcheck/formcheck-jpane.js
---------------------------------------------------------------------------------------
2.1 injectBefore, injectAfter, injectInside is deprecated in MooTools
--> changed to inject(...,"before"), inject(...,"after"), inject(...,"bottom")
---------------------------------------------------------------------------------------
2.2 Browser.Engine is deprecated since MooTools 1.3
--> Changed Browser.engine.trident to Browser.ie (removed Browser.Engine.version
because I didn't find which IE-Versions are using Trident version 5)
---------------------------------------------------------------------------------------
2.3 The message when a field is not correct is empty because it is checked whether the title
of the field is null or not. Her it is not null but an empty string
--> line 45
if(obj.get('title') != null && obj.get('title') != ""){
---------------------------------------------------------------------------------------
2.4 In Joomla 3 an additional dt/dd (with style=hidden) is added in front of the tabs
(in libraries/cms/html/tabs.php), so the wrong tab is opened by ChronoForms
--> changed line 155 of formcheck-jpane.js to select only dt's with the class tabs
parentPanel[0].getParent('div').getParent('div').getFirst('dl').getChildren('dt.tabs').each(function(tab){
I hope this also helps others
Thomas
This is ALMOST there. Seems to have an issue with captcha first and foremost.
Then if I removed captcha, i get a debug page showing no validation errors, & it sends the email/submits the form though NO fields at all are filled out. See screenshot for the after submit page.
Then if I removed captcha, i get a debug page showing no validation errors, & it sends the email/submits the form though NO fields at all are filled out. See screenshot for the after submit page.
Hi Thomas,
I can confirm that this fix works, Thank you very much for sharing it!🙂
Regards,
Max
I can confirm that this fix works, Thank you very much for sharing it!🙂
Regards,
Max
This topic is locked and no more replies can be posted.