Cannot enable validation

rickB 18 May, 2009
I've been struggling and hesitant to ask because I must be missing something simple but I cannot get validation to work. When I create a form I make sure the validation field is checked and later under the validation tab I make sure "enable validation" is yes and I have the field name in the "required" line. But when I fill out a form, leaving the field blank does not return the form with an error message, instead it submits.
Can anyone give me a suggestion on what I may have failed to do?
Thanks,

Rick
rickB 19 May, 2009
Problem solved in that I didn't have mootools loaded. It works now.
Thanks,

Rick
fluxos 19 May, 2009
Hi Rick, would appreciate if you share more on how you "load" mootools.

I'm having the same problem whereby validation would not work.

I have so far.......
Enabled Load Chronoforms CSS/JS Files? to yes.

Pasted this code even:
<?php
JHTML::_('behavior.mootools');
?>

But to no avail. Validation still does not work, i was wondering if you or anyone could help. Thanks
Max_admin 20 May, 2009
Hi fluxos,

Enabled Load Chronoforms CSS/JS Files? to yes. is enough to load the mootools!

validation may not work for many different reasons, there may be some JS conflict at your page, please post a link to the page and I will try to find why it doesn't work for you!

how did you enable the validation ? using the wizard or the validation tab ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jdvernier 24 May, 2009
Hi Max,

I too am having the same problems with my forms. I am still a noob to the software though and probably didn't configure ChronoForms correctly.

I have a couple of fields in each of the forms on my site that are required. When I used the form wizard to design each form, I made sure to check the "Required" box in these required fields and also selected the appropriate validation type. After each form was built in the wizard, I went to the validation tab to endure validation was enabled and so was MooTools.

If I leave all the fields blank and submit, I am taken to the "Thank you for submitting a form" page that I created. I will then get an email with the results of the form. Instead of having no data, such as "Name:" it will display the placeholder name for that element i.e. "Name: {text_0}".

So I have two problems - I would like to get the validation working and I also need to get the emails formatted correctly. I obviously shouldn't be able to submit a blank form when there are required fields. I suspect that if I can solve the validation issue the email issue will solve itself.

Anyway the URLs to the forms I am having problems with are:
http://www.johnvernier.com/clients/ryan/lake_norman_newsletter.html
http://www.johnvernier.com/clients/ryan/foreclosed_home_request.html
http://www.johnvernier.com/clients/ryan/neighborhood_price_alert.html
http://www.johnvernier.com/clients/ryan/free_home_valuation.html
http://www.johnvernier.com/clients/ryan/request_free_info.html

I am not opposed to writing a php script to handle the form validation on the server side if need be, but I would prefer to use ChronoForms default functionality to handle the validation.

Thanks in advance,

John
jdvernier 24 May, 2009
Disregard the issue with the email.

Yesterday I added some select menus to my forms. These select menus replaced some of the text boxes in my menus. When I created them, I gave them an id and name of select_# (where # is an integer value). After making this change, I forgot to update the email template with the new names for the select menus. So when I would get an email that would have a field like "State: {text_8}", it was because {text_8} was now called {select_2}. Problem solved!

I am still not able to validate the forms, though - I can still submit a blank form, which is obviously a problem. I am sure it's something simple that I am overlooking.

Thanks,

John
GreyHead 24 May, 2009
Hi jdvernier,


How have you enabled validation? Is it through the Validation tab, or by adding e.g. 'required' to the classes in the Form HTML?

Bob
jdvernier 24 May, 2009
Hi Bob! Thanks for the quick reply.

Validation is enabled in the Validation tab of each one of my forms. Validation library for each form is mootools (I don't have another option available).

The forms also have the required class where applicable. For example, all the forms require at least a name and email. The HTML for the name input box has a class of "cf_inputbox required validate-alphanum". The HTML for the email input box has a class of "cf_inputbox required validate-email".

If I have to code my own validation handler in PHP to run server side, that will not be an issue. I may end up doing that for this project as it is for a client and I am facing a deadline of next week. But I would still like to figure out why I am having this issue even if we don't solve it in time for this project. I find ChronoForms to be very intuitive and useful for reducing development time on Joomla-built sites and plan to use it on future projects.
Max_admin 24 May, 2009
Hi jdvernier,

the form loads with a JS error and so the validation will not work, I'm not sure why the error happens but try with a different Joomla theme ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rickB 27 May, 2009

Hi Rick, would appreciate if you share more on how you "load" mootools.

I'm having the same problem whereby validation would not work.

I have so far.......
Enabled Load Chronoforms CSS/JS Files? to yes.

Pasted this code even:
<?php
JHTML::_('behavior.mootools');
?>

But to no avail. Validation still does not work, i was wondering if you or anyone could help. Thanks



Hi fluxos,
Sorry for the delay, I was not checking the forum. I had to enable mootools in the index.php file of the active template. I believe this is the web page that helped me.

https://support.pillwax.com/open-source/doku.php?id=joomla:general:mootools

Hope this helps.

Rick
This topic is locked and no more replies can be posted.