JS and Validation Not Working with default template

dj59 10 Feb, 2013
I have a form that has required fields and validation set in the configuration of the field.
When I click test form and test it, this all works; when I test the form in the site with the template beez20, it does not work. If I change to the atomic default template, it works. But I need it to work with beez20, so it has the same logo, banner, etc. I put the debugger into the bottom of the on submit action event and the message was:

Validation Errors:
Array
(
[chrono_verification] => You have entered a wrong verification code!
)
Debug Data
Core Captcha
Couldn't find the captcha field value in the $_POST array!


I don't really know what that message is telling me.
I have been trying to figure this out for nearly a week, so any ideas or help would be appreciated.
I also posted this on the joomla forum because it has to do with the template.
So far no answers.
Thanks.
GreyHead 11 Feb, 2013
Hi dj59,

I don't think that the Joomla! validation code helps here. ChronoForms doesn't use it.

The debugger code suggests that the form is submitting but the chrono_verification input isn't then in the form data.

Please post a link to the form so I can take a quick look.

Bob
dj59 12 Feb, 2013
Found the problem!
Previously I wanted to Disable font size and seach box at the top of the page
in my main template index.php for Beez20 I commented out the following row.
 
<!-- <div id="fontsize"></div> -->

BUT by doing this, I lost all my forms JS, required fields, validation. !!!
So, now I have all my form functionality, however I still have the unwanted font size and search box at the top.
GreyHead 12 Feb, 2013
Hi dj59,

I can't see it.

Bob
dj59 12 Feb, 2013
Here is what works so that...
1. the font size and search box at the top of all the pages is gone
2. the required, validation and JS in chronoforms still works.

In the template index.php file:

<div id="fontsize" style="display:none"></div>


Instead of

<div id="fontsize"></div>


If you just comment out the code

<div id="fontsize"></div>

Your chronoforms won't work properly.

Anyway, that is how it worked for me.
GreyHead 13 Feb, 2013
Hi dj59,

It looks as though you have broken your template. These <div>s that you are editing have nothing to do with ChronoForms, though broken template may stop the form displaying properly.

Bob
dj59 13 Feb, 2013
I wonder how I broke it...and I wonder then how to repair it so that there are no future issues.

The way I found this is to put a fresh copy of the template in my development area, then one by one compare the files that I had edited to the fresh copy template files....then load them to the development site....and that is what I found that seemed to work.

However, there is one field on the forms still not working. It should be a phone validation, but it seems to be a number.
This topic is locked and no more replies can be posted.