HI!
I'm using 3 forms in one website.
2 of them work without any problem, but the validation of a new form ( not yet online ) doesn't work as needed.
All the fields are required, but only 2 of them (first one and captcha) are asked if empty? All other are accepted as valid.
The form is visible here : http://www.lescopainsdabord.be/index.php?option=com_chronoforms&chronoform=reservations
I didn't understand why this arrives only on this form.
A saw in the forum that many problems arrives when jquery is used by another plugin, but it's not the case here.
I'm using Joomla 2.5.1, Chronoform 4.0 RC3.11
thanks for your help !
Attached is the archive of the 3 forms.[attachment=0]CFV4_FormsBackup_ON_www.lescopainsdabord.be_13_Oct_2012_00_41_25.cf4bak.zip[/attachment]
I'm using 3 forms in one website.
2 of them work without any problem, but the validation of a new form ( not yet online ) doesn't work as needed.
All the fields are required, but only 2 of them (first one and captcha) are asked if empty? All other are accepted as valid.
The form is visible here : http://www.lescopainsdabord.be/index.php?option=com_chronoforms&chronoform=reservations
I didn't understand why this arrives only on this form.
A saw in the forum that many problems arrives when jquery is used by another plugin, but it's not the case here.
I'm using Joomla 2.5.1, Chronoform 4.0 RC3.11
thanks for your help !
Attached is the archive of the 3 forms.[attachment=0]CFV4_FormsBackup_ON_www.lescopainsdabord.be_13_Oct_2012_00_41_25.cf4bak.zip[/attachment]
Hi labbyjoel,
Actually all of the validations work except for the date-time picker. That one breaks the validation and allows the form to submit. If you add a date then the remaining validations are OK.
The datetime picker has a class that looks like this
I think that the problem is that the target part which is used by the datepicker is inside the validate[]. I'm not clear why that is, I'll take a look at the code later.
Bob
Actually all of the validations work except for the date-time picker. That one breaks the validation and allows the form to submit. If you add a date then the remaining validations are OK.
The datetime picker has a class that looks like this
class="validate['required','target:input_datetime_2_clone_id'] cf_date_picker"
I think that the problem is that the target part which is used by the datepicker is inside the validate[]. I'm not clear why that is, I'll take a look at the code later.
Bob
Hi labbyjoel,
The problem is with the DatePicker code. If I switch to the MooTools DatePicker on the form General tab the error goes away.
But the standard MooTools datepicker doesn't support the 'weekdays' option :-( I have a modified version that does include that option. Please unzip the attached file and copy the Picker.Date.js file to the components/com_chronoforms/js/datepicker_moo folder (I suggest that you rename the old version first as backup).
Bob
The problem is with the DatePicker code. If I switch to the MooTools DatePicker on the form General tab the error goes away.
But the standard MooTools datepicker doesn't support the 'weekdays' option :-( I have a modified version that does include that option. Please unzip the attached file and copy the Picker.Date.js file to the components/com_chronoforms/js/datepicker_moo folder (I suggest that you rename the old version first as backup).
Bob
Hi Bob !
I've downloaded and replaced the Picker.Date.js, but unfortunately, the problem is still there as you can check here : http://www.lescopainsdabord.be/index.php?option=com_chronoforms&chronoform=reservations
joe
I've downloaded and replaced the Picker.Date.js, but unfortunately, the problem is still there as you can check here : http://www.lescopainsdabord.be/index.php?option=com_chronoforms&chronoform=reservations
joe
Hi Joe,
It looks to me as though it now fails when the lunch/dinner option is hidden. If you set a date then the rest of the validation including the now un-hidden inputs works OK.
The problem may be that the validation breaks on hidden inputs like this. Try disabling them as well; that also disables the validation and it will be re-enabled when they are displayed.
Bob
It looks to me as though it now fails when the lunch/dinner option is hidden. If you set a date then the rest of the validation including the now un-hidden inputs works OK.
The problem may be that the validation breaks on hidden inputs like this. Try disabling them as well; that also disables the validation and it will be re-enabled when they are displayed.
Bob
On the other forms using datepicker and without hidden fields, the problem is the same. So I don't think that's the problem.
You can try the form http://www.lescopainsdabord.be/index.php/devenez-copain just use test/test as Nom/Prenom. This form is in production.
Thanks
joe
You can try the form http://www.lescopainsdabord.be/index.php/devenez-copain just use test/test as Nom/Prenom. This form is in production.
Thanks
joe
Hi Joe,
I agree - it's linked somehow to the date input but as there are no error messages it's not easy to spot the problem. Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look. I have a test site here set up using the non-compressed version of the FormCheck code that makes it easier to debug.
Bob
I agree - it's linked somehow to the date input but as there are no error messages it's not easy to spot the problem. Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look. I have a test site here set up using the non-compressed version of the FormCheck code that makes it easier to debug.
Bob
Here is the backup of 2 forms. Thanks for your help !!
[attachment=0]CFV4_FormsBackup_ON_www.lescopainsdabord.be_21_Oct_2012_16_14_28.cf4bak.zip[/attachment]
[attachment=0]CFV4_FormsBackup_ON_www.lescopainsdabord.be_21_Oct_2012_16_14_28.cf4bak.zip[/attachment]
Hi labbyjoel,
I've struggled with this but think I have found the problem. There's a bug in the ChronoForms code which only shows up when you validate a MooTools date-picker.
The previous MonkeyPhysics datepicker created a clone of the datepicker input and moved the original off the page. Max added validation code to set the 'target' to the clone and apply the validation to that so the error bubble wasn't set off the page.
The MooTools datepicker doesn't create a clone in the same way so the JavaScript was failing when it tried to apply the validation to the non-existent input.
I've worked out a fix which goes in the \components\com_chronoforms\js\formcheck\formcheck-max.js file. Look for this code around lines 12-13
Although it looks longer the change is mostly that it now checks that the target input exists.
I'll link this post to the current bugs list.
Bob
I've struggled with this but think I have found the problem. There's a bug in the ChronoForms code which only shows up when you validate a MooTools date-picker.
The previous MonkeyPhysics datepicker created a clone of the datepicker input and moved the original off the page. Max added validation code to set the 'target' to the clone and apply the validation to that so the error bubble wasn't set off the page.
The MooTools datepicker doesn't create a clone in the same way so the JavaScript was failing when it tried to apply the validation to the non-existent input.
I've worked out a fix which goes in the \components\com_chronoforms\js\formcheck\formcheck-max.js file. Look for this code around lines 12-13
//determine position
var coord = obj.target ? $(obj.target).getCoordinates() : obj.getCoordinates();
and replace it with this //determine position
var coord;
if(obj.target && typeOf($(obj.target)) != 'null') {
coord = $(obj.target).getCoordinates();
} else {
coord = obj.getCoordinates();
}
Although it looks longer the change is mostly that it now checks that the target input exists.
I'll link this post to the current bugs list.
Bob
This topic is locked and no more replies can be posted.