Form Validation not working

Xaxier 06 Mar, 2012
Hi there,

My field validation is not working. There are couple of fields which I actually mark as Required but when I send submit, it just submit without notifying the user of the "REQUIRED" field. I am using Joomla 1.7. Below is the debug result. Please advice, thanks

Data Array: 
Array ( [chronoform] => Job_Application [event] => submit [format] => html [Itemid] => 524 [option] => com_chronoforms [view] => form [Name] => [Birth_Year] => [Alamat] => [Poskod] => [Negeri] => Perak [E-mail] => [Tel_No] => [Agen] => [chrono_verification] => VP4Kx [input_submit_13] => Submit [faca844c949ef893e54010396d893edf] => 1 )
Validation Errors: 
Array ( )
Debug Data
Core Captcha
Passed the core captcha check!
email
10
Result
An email has been SENT successfully from (admin)admin@crystalaves.com.my to admin@crystalaves.com.my
Body
Applikasi untuk menjadi Agent Anda kena mengisi borang ini supaya kami boleh mengenali anda dan kami akan menghubungi anda secepat mungkin jika applikasi anda berjaya.
Nama	
Tahun Lahir	
Alamat	
Poskod	
Negeri	 Perak
E-Mel	
No. Telefon	
Kenapa anda ingin jadi agen?	
Enter the code	 VP4Kx


Submitted by 118.107.223.2
Attachments
array ( )
GreyHead 06 Mar, 2012
Hi xavier,

Have you checked your form page for JavaScript errors?

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

Bob
GreyHead 06 Mar, 2012
Hi xavier,

There are JavaScript errors on the page that are preventing the validation from working :-(

Your template (or some other component) is loading the jQuery JavaScript library.

Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest - which may or may not work - is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat plugin named JB Library from Joomla! Bamboo that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However this requires that JQuery is loaded using the Joomla Document object methods.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
Xaxier 07 Mar, 2012
Hi GreyHead

It seem template is not the issue here as I had removed the template and still the problem persist. I had also installed the JB library and while it manage to get the validation works, the photo slider component failed. I was thinking the photo slider might be the culprit and disabled it but it is not working also. I had also loaded the suggested noconflict() code into the Javascript box but it is not working either.

Can you please advice what else I can do?
GreyHead 07 Mar, 2012
Hi xavier,

If you look at the form on it's own here you will see that the validation is working OK.

If you view the form with the template and other modules the validation doesn't work and there are JavaScript errors on the page when you click submit.

Most of the suggestions I can make are in the document I already linked for you. It's up to you to get your site working correctly and without errors. If you choose to use external scripts then they have to be managed :-(

Bob
darwis 13 Sep, 2013
Hi,

I have some problem


when i add debugger to the action, i got this debugging info:

[f6a0e2525163f1d3f77b60e721e4b57a] => 1
)
Validation Errors:
Array
(
)
Debug Data
Email info
Conditional Email cancelled: send_email was not Yes

please advise what i am doing wrong?
GreyHead 13 Sep, 2013
Hi darwis,

The Debugger data suggests that you form has no input elements at all.

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

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