Hi Guys
I tried to reuse a YooTheme UIKit based CF4 contact form from Yoonique in CF5. The jQuery field validation code worked perfectly in CF4, but upon teasing the form, it caused the error message shown below. Any suggestion on how going from CF4 to CF5 might cause this problem? Screen shot is enclosed and jQuery source code is listed below for your reference.
Thank you very much for your assistance!
SH
I tried to reuse a YooTheme UIKit based CF4 contact form from Yoonique in CF5. The jQuery field validation code worked perfectly in CF4, but upon teasing the form, it caused the error message shown below. Any suggestion on how going from CF4 to CF5 might cause this problem? Screen shot is enclosed and jQuery source code is listed below for your reference.
Thank you very much for your assistance!
SH
"); $(form + " div.error-message").replaceWith('
' + $(form + " div.error-message").html() + "
"); }); jQuery(window).load(function() { formCheck
Notice: Undefined property: GCore\Extensions\Chronoforms\Libs\Form::$form_name in /home/meridi28/public_html/dev/administrator/components/com_chronoforms5/chronoforms/actions/js/js.php(33) : eval()'d code on line 10
_.focusOnError = function(b) { if (this.options.display.scrollToFirst && !this.alreadyFocused && !this.isScrolling) { var a; a = (b.getCoordinates().top - b.getCoordinates().bottom) / 2; this.isScrolling = true; if (window.getScroll().y != a) { new Fx.Scroll(window, { onComplete: function() { this.isScrolling = false; if (b.getProperty("type") != "hidden") { b.focus() } }.bind(this) }).start(0, a) } else { this.isScrolling = false; b.focus() } this.alreadyFocused = true } } }); jQuery(window).load(function() { formCheck
Notice: Undefined property: GCore\Extensions\Chronoforms\Libs\Form::$form_name in /home/meridi28/public_html/dev/administrator/components/com_chronoforms5/chronoforms/actions/js/js.php(33) : eval()'d code on line 35
_.setOptions({ errorClass: "uk-alert uk-alert-warning", fieldErrorClass: "", display: { errorsLocation: 3, indicateErrors: 2, flashTips: true, fadeDuration: 1001, showErrors: 1, addClassErrorToField: 0, } }); }); jQuery(document).ready(function($){ $("#chronoform-UIKContact").find(":input[name='firstname']").addClass('validate["required"]');$("#chronoform-UIKContact").find(":input[name='lastname']").addClass('validate["required"]');$("#chronoform-UIKContact").find(":input[name='email']").addClass('validate["required","email"]');$("#chronoform-UIKContact").find(":input[name='subject']").addClass('validate["required"]');$("#chronoform-UIKContact").find(":input[name='message']").addClass('validate["required"]'); $("#chronoform-UIKContact").gvalidate({}); }); jQuery(document).ready(function($){ function chronoforms_fields_events(){ } chronoforms_fields_events(); }); var RecaptchaOptions = { theme : 'white', lang : 'en' };
=====================
jQuery(function($) {
var form = "#<?php echo 'chronoform_'.$form->form_name?>";
$(form).addClass("uk-form uk-width-1-1 uk-vertical-align-middle tm-form-primary");
$(form + " span.cf_alert").replaceWith('<div class="uk-alert uk-alert-danger uk-alert-large">' + $(form + " span.cf_alert").html() + "</div>");
$(form + " div.error-message").replaceWith('<div class="uk-alert uk-alert-warning">' + $(form + " div.error-message").html() + "</div>");
});
jQuery(window).load(function() {
formCheck<?php echo '_'.$form->form_name?>.focusOnError = function(b) {
if (this.options.display.scrollToFirst && !this.alreadyFocused && !this.isScrolling) {
var a;
a = (b.getCoordinates().top - b.getCoordinates().bottom) / 2;
this.isScrolling = true;
if (window.getScroll().y != a) {
new Fx.Scroll(window, {
onComplete: function() {
this.isScrolling = false;
if (b.getProperty("type") != "hidden") {
b.focus()
}
}.bind(this)
}).start(0, a)
} else {
this.isScrolling = false;
b.focus()
}
this.alreadyFocused = true
}
}
});
jQuery(window).load(function() {
formCheck<?php echo '_'.$form->form_name?>.setOptions({
errorClass: "uk-alert uk-alert-warning",
fieldErrorClass: "",
display: {
errorsLocation: 3,
indicateErrors: 2,
flashTips: true,
fadeDuration: 1001,
showErrors: 1,
addClassErrorToField: 0,
}
});
});