Hi i trying to create a form with chronoforms,
but in browser console i receive always this error.
e5cbf2c….js:338 Uncaught TypeError: Cannot read property '0' of undefined
at this line of code.
The same thing hapens with the demo basic template.
Waht i can check to solve this issue?
Thanks in Advance
but in browser console i receive always this error.
e5cbf2c….js:338 Uncaught TypeError: Cannot read property '0' of undefined
at this line of code.
if(jQuery(inp).data('validationrules')['rules'][0]['type'].indexOf(r) >= 0)
The same thing hapens with the demo basic template.
Waht i can check to solve this issue?
Thanks in Advance
Hi Pistone,
I haven't seen this before, please post a link to the form so I can take a look.
Bob
I haven't seen this before, please post a link to the form so I can take a look.
Bob
Hi GreyHead,
i've found the bug that cause the error.
This is the html code created from field.php:
with this line of php code:
the error is this: data-validationrules="{", the second double quote close the data validation-rules attribute, this explains the javascript error.
Modifing hte code line in:
the form works like a charm.
Hope this helps all the other user with similar issues...
Bye.
i've found the bug that cause the error.
This is the html code created from field.php:
<input data-validationrules="{" identifier":"nome-main","rules":[{"type":"required","prompt":"nome"}]}"="" data-validate="Nome-main" data-events="[]" placeholder="Nome" name="Nome" id="Nome" value="" type="text">
with this line of php code:
$Html->attr('data-validationrules', json_encode($validate_tag));
the error is this: data-validationrules="{", the second double quote close the data validation-rules attribute, this explains the javascript error.
Modifing hte code line in:
$Html->attr('data-validationrules', htmlspecialchars(json_encode($validate_tag)));
the form works like a charm.
Hope this helps all the other user with similar issues...
Bye.
Hi Pistone,
Thank you, a fix has been applied to the issue in v6.0.7
Best regards,
Max
Thank you, a fix has been applied to the issue in v6.0.7
Best regards,
Max
This topic is locked and no more replies can be posted.
