Hi,
β
I've just updated Chronoforms from v6.0.6 to 6.0.16, which has fixed problems with email formatting and the repeater area - good - but created a problem in that when a field in a Repeater Area is marked as Required, when submitting the form, the field fails validation whether it is empty or not. Similar fields outside the Repeater Area work fine.
I have added the {var:repeat_name.key} to the field name and id as previously mentioned in this forum. What am i missing? simple example of setup that fails validation whether First Name(s) is populated or not, is below. Validation tab just has Required selected.
β
I've just updated Chronoforms from v6.0.6 to 6.0.16, which has fixed problems with email formatting and the repeater area - good - but created a problem in that when a field in a Repeater Area is marked as Required, when submitting the form, the field fails validation whether it is empty or not. Similar fields outside the Repeater Area work fine.
I have added the {var:repeat_name.key} to the field name and id as previously mentioned in this forum. What am i missing? simple example of setup that fails validation whether First Name(s) is populated or not, is below. Validation tab just has Required selected.

Hi rikford,
β
Please test the form using the "Preview" button in the form edit page, does the form work as expected ?
β
I have just tested this with a single field form and it works fine.
β
Best regards
β
Please test the form using the "Preview" button in the form edit page, does the form work as expected ?
β
I have just tested this with a single field form and it works fine.
β
Best regards
No, it doesn't - same issue
I've just done a test custom Javascript validation below, as mentioned elsewhere in the forum, and that does work. I guess I can tweak that to get the required result? But would be much easier if i can get it working without that. and I wouldn't get the red * for required field.
β
jQuery.fn.form.settings.rules.customfn = function(value, param) {
var x = 12;
if (Number(value) < Number(x)) {
return false;
}else{
return true;
}
};
I've just done a test custom Javascript validation below, as mentioned elsewhere in the forum, and that does work. I guess I can tweak that to get the required result? But would be much easier if i can get it working without that. and I wouldn't get the red * for required field.
β
jQuery.fn.form.settings.rules.customfn = function(value, param) {
var x = 12;
if (Number(value) < Number(x)) {
return false;
}else{
return true;
}
};
Can you post a link to the form here so I can check it ? you can have it inside a private box (the lock icon)
β
Best regards
β
Best regards
Sadly, this is on a development site at the minute, not available from outside. I can set it up on another live site, I'll get back to you when I have...
β
Thanks
β
Rik.
β
Thanks
β
Rik.
Hi Max,
β
You can see the problem on this form:-
β
β
Thanks,
Rik.
β
You can see the problem on this form:-
β
This is private content
β
Thanks,
Rik.
Hi rikford,
β
The validation works fine, before clicking "add" or after, all required fields are marked as required and the error is shown below, I tested this on Google Chrome browser, which browser do you use ?
β
Best regards
β
The validation works fine, before clicking "add" or after, all required fields are marked as required and the error is shown below, I tested this on Google Chrome browser, which browser do you use ?
β
Best regards
Hi Max,
β
I use Firefox primarily, also IE, Safari. Installed Chrome too, that also fails for me. from the Test form I indicated to you on Wednesday:-
β
β
I use Firefox primarily, also IE, Safari. Installed Chrome too, that also fails for me. from the Test form I indicated to you on Wednesday:-
β
Hi rikford,
β
Ok, please press F12 on your keyboard to open the browser console, do you have any errors there ?
β
Best regards
β
Ok, please press F12 on your keyboard to open the browser console, do you have any errors there ?
β
Best regards
Hi Max,
β
No error shown on F12.
β
Are you saying that when you access the test form site advised on Wednesday that, for you, validation works correctly? even though when i access the same form from four different browsers on three different devices, i still get the error?
β
Thanks,
Rik.
β
No error shown on F12.
β
Are you saying that when you access the test form site advised on Wednesday that, for you, validation works correctly? even though when i access the same form from four different browsers on three different devices, i still get the error?
β
Thanks,
Rik.
Hi Max,
β
I am having the same problem as rikford with my repeater areas. If the validation is turned on, the fields are filled properly and I submit the form I get the error saying the fields are empty.
β
I have tried loading the fields with validation turned off and then use the "multiply" button to turn it on (through the field events tab) but it does not work.
β
I also have no errors on the console.
β
(This happens both with Chrome and Firefox).
β
Thank you very much for your time.
β
Best regards,
Joao Serina
β
I am having the same problem as rikford with my repeater areas. If the validation is turned on, the fields are filled properly and I submit the form I get the error saying the fields are empty.
β
I have tried loading the fields with validation turned off and then use the "multiply" button to turn it on (through the field events tab) but it does not work.
β
I also have no errors on the console.
β
(This happens both with Chrome and Firefox).
β
Thank you very much for your time.
β
Best regards,
Joao Serina
Hi Joao,
β
You are speaking about the server validation which appears AFTER the form is sent, if this is correct then you are having the expected behavior, its not working with the repeater and you will need to configure the "Validate fields" action to skip the fields inside the repeater.
β
I will try to add this feature to a future update.
β
Best regards
β
You are speaking about the server validation which appears AFTER the form is sent, if this is correct then you are having the expected behavior, its not working with the repeater and you will need to configure the "Validate fields" action to skip the fields inside the repeater.
β
I will try to add this feature to a future update.
β
Best regards
AH! I see. That's it π So if I want server side validation I'll have to create my own custom PHP correct?
β
Thanks a lot!
β
Best regards,
Joao Serina
β
Thanks a lot!
β
Best regards,
Joao Serina
Hi Max,
β
Is that also the answer for my scenario? My incorrect validation errors only appear after pressing the Send button, when validation occurs prior to the email being sent.
β
Thanks,
Rik.
β
Is that also the answer for my scenario? My incorrect validation errors only appear after pressing the Send button, when validation occurs prior to the email being sent.
β
Thanks,
Rik.
I just have one question, in the "Fields list" should I used the fields names, ids or classes?
β
The name of the one of my fields is "Sample-{var:area_repeater24.key}-Information[Identification]" but when I add it to the "Field list" I still get an error that the field is empty.
β
I have also tryed using "Sample-#area_repeater24.count-Information[Identification]" but it didn't work either.
β
I have looked in the manual but couldn't find the information.
β
Best regards,
Joao Serina
β
The name of the one of my fields is "Sample-{var:area_repeater24.key}-Information[Identification]" but when I add it to the "Field list" I still get an error that the field is empty.
β
I have also tryed using "Sample-#area_repeater24.count-Information[Identification]" but it didn't work either.
β
I have looked in the manual but couldn't find the information.
β
Best regards,
Joao Serina
Hi Max,
β
Your answer to Joao also fixed my problem.
β
In my example form, adding first_names{var:area_repeater3.key} as an exclusion to the Fields List of Validate Fields makes my form work as expected, no custom code required. Also had to set Fields list selection to All fields with validation rules but excluding those listed below.
β
Thanks.
β
Rik.
β
Your answer to Joao also fixed my problem.
β
In my example form, adding first_names{var:area_repeater3.key} as an exclusion to the Fields List of Validate Fields makes my form work as expected, no custom code required. Also had to set Fields list selection to All fields with validation rules but excluding those listed below.
β
Thanks.
β
Rik.
Just figured it out! π€£ IF you want to store all the information from each repeated area into an array like I am doing, you will need to used the "validate data" Tool instead of "Validate fields".
β
When storing the info of repeated elements into a single array you name the fields as: Repeated_area_array[field_property] and for some reason, "Validate fields" doesn't work with that name structure.
β
All you need to do is to place the field name (ex: Repeated_area_array[field_property]) followed by the validation rules as shown in the manual page 15.
β
Example for a required field:
β
Best regards,
Joao Serina
β
When storing the info of repeated elements into a single array you name the fields as: Repeated_area_array[field_property] and for some reason, "Validate fields" doesn't work with that name structure.
β
All you need to do is to place the field name (ex: Repeated_area_array[field_property]) followed by the validation rules as shown in the manual page 15.
β
Example for a required field:
Repeated_area_array[field_property]/required:This field is required.Thank you Max and rikford for your time! π
β
Best regards,
Joao Serina
This topic is locked and no more replies can be posted.