Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Visforms validation error

More
7 years 1 month ago #4163 by f.fraczek
Visforms validation error was created by f.fraczek
Hello,

since today I'm facing a jquery validation problem on my site. When I open a layer where my form is I see this code breaking the site:

"
', url: 'Please enter a valid url:
E.g. www.domain.com ', date: 'Please enter a valid date.', dateISO: "Please enter a valid date (ISO).", number: 'Please enter a valid number.', digits: 'Please enter a digit.', creditcard: "Please enter a valid credit card number.", equalTo: 'Please repeat the value.', maxlength: jQuery.validator.format('Please enter no more than {0} characters.'), minlength: jQuery.validator.format('Please enter at least {0} characters.'), rangelength: jQuery.validator.format('Please enter {0} to {1} character.'), range: jQuery.validator.format('Please enter a number between {0} and {1}.'), max: jQuery.validator.format('Please enter a number lower or equal {0}.'), min: jQuery.validator.format('Please enter a number greater or equal {0}.') }); jQuery.validator.addMethod("dateDMY", function(value, element) { var check = false; var re = /^(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{4}$/; if( re.test(value)) { var adata = value.split('.'); var day = parseInt(adata[0],10); var month = parseInt(adata[1],10); var year = parseInt(adata[2],10); if (day == 31 && (month == 4 || month == 6 || month == 9 || month == 11)) { check = false; // 31st of a month with 30 days } else if (day >= 30 && month == 2) { check = false; // February 30th or 31st } else if (month == 2 && day == 29 && ! (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))) { check = false; // February 29th outside a leap year } else { check = true; // Valid date } } return this.optional(element) || check; }, "Please enter a valid date."); jQuery.validator.addMethod("dateMDY", function(value, element) { var check = false; var re = /^(0[1-9]|1[012])[\/](0[1-9]|[12][0-9]|3[01])[\/]\d{4}$/; if( re.test(value)) { var adata = value.split('/'); var month = parseInt(adata[0],10); var day = parseInt(adata[1],10); var year = parseInt(adata[2],10); if (day == 31 && (month == 4 || month == 6 || month == 9 || month == 11)) { check = false; // 31st of a month with 30 days } else if (day >= 30 && month == 2) { check = false; // February 30th or 31st } else if (month == 2 && day == 29 && ! (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))) { check = false; // February 29th outside a leap year } else { check = true; // Valid date } } return this.optional(element) || check; }, "Please enter a valid date."); jQuery.validator.addMethod("dateYMD", function(value, element) { var check = false; var re = /^\d{4}[\-](0[1-9]|1[012])[\-](0[1-9]|[12][0-9]|3[01])$/; if( re.test(value)) { var adata = value.split('-'); var year = parseInt(adata[0],10); var month = parseInt(adata[1],10); var day = parseInt(adata[2],10); if (day == 31 && (month == 4 || month == 6 || month == 9 || month == 11)) { check = false; // 31st of a month with 30 days } else if (day >= 30 && month == 2) { check = false; // February 30th or 31st } else if (month == 2 && day == 29 && ! (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))) { check = false; // February 29th outside a leap year } else { check = true; // Valid date } } return this.optional(element) || check; }, "Please enter a valid date."); jQuery('.captcharefresh3').bind({ 'click' : function() { if (jQuery('#captchacode3')) { jQuery('#captchacode3').attr('src', 'index.php?option=com_visforms&task=visforms.captcha&sid=' + Math.random()+ '&id=3'); } } }); }); jQuery(document).ready( function(){ jQuery(document).displayChanger(); jQuery(".conditional").on("checkConditionalState", {restricts : {}}, function (e) { jQuery(this).toggleDisplay(e.data.restricts); }); }); //fix placeholder for IE7 and IE8 jQuery(document).ready( function () { if (!jQuery.support.placeholder) { jQuery("[placeholder]").focus(function () { if (jQuery(this).val() == jQuery(this).attr("placeholder")) jQuery(this).val(""); }).blur(function () { if (jQuery(this).val() == "") jQuery(this).val(jQuery(this).attr("placeholder")); }).blur(); jQuery("[placeholder]").parents("form").submit(function () { jQuery(this).find('[placeholder]').each(function() { if (jQuery(this).val() == jQuery(this).attr("placeholder")) { jQuery(this).val(""); } }); }); } });
"

You don't have to fill the form at all, It's just there when you relod the page.

Can anyone help me with fixing that?

More
7 years 1 month ago #4164 by Administrator AV
Replied by Administrator AV on topic Visforms validation error
Hi,

this certainly did not just happen without any reason or any changes you made.

I think, that this may be due to an invalid quote or double quote but I do not know where exactly it comes from.
Did you update Visforms?
Did you modifiy your forms or fields? I.E. create/modify texts in form or field configuration, create/modify option lists of selects/radios/checkboxgroups or anything like that, where you used quotes or double quotes
Did you modify language files or installed new language files

Could I have a link to take a look at the form?

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: f.fraczek

More
7 years 1 month ago #4165 by f.fraczek
Replied by f.fraczek on topic Visforms validation error
Hi, thanks a lot for a quick reply.

Here's a link to a site where one of visform forms is used - just click on the purple button - elliteq.pl/jednolity-plik-kontrolny

In terms of module update i believe I have the newest versions as I update all my plugins and modules/

An yes, I did make some enhancements in form, but it was nothing major and I did not add any quotes.

I really appreciate your help.

More
7 years 1 month ago #4166 by f.fraczek
Replied by f.fraczek on topic Visforms validation error
Oh! It wasn't updated after all. I just believed in auto updates.

It works fine now. Thanks a lot!

More
7 years 1 month ago #4167 by Administrator AV
Replied by Administrator AV on topic Visforms validation error
Well, fine then.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: f.fraczek

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum