Home › Forums › Quform WordPress › Uncaught ReferenceError: iPhorm is not defined
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by Ally.
- AuthorPosts
- March 14, 2019 at 2:40 pm #28779jerkskiParticipant
Hi again, this problem seems to persist. I updated quform to 1.10.0 and wordpress to 5.1. Quform loads fine on existing pages. Any new pages I create and add a Quform form to reveals this error. How would you recommend I troubleshoot this? I can see in Chrome Dev console under Network that is does not load any iPhorm js on these new pages. On the old pages, it loads just fine. I have no code that limits js from loading at all on specific pages, there is nothing customized that would restrict quform from functioning. It cannot be a directory permission issue since it loads on the existing pages. I am not loading any js manually on any pages.
Uncaught ReferenceError: iPhorm is not defined at HTMLDocument.<anonymous> ((index):1831) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2) at Function.ready (jquery.js?ver=1.12.4:2) at HTMLDocument.K (jquery.js?ver=1.12.4:2)
Here is the code that the error focuses on at 1831:
<script type="text/javascript"> jQuery(document).ready(function($) { iPhorm.logic[6] = {"logic":{"166":{"action":"show","match":"any","rules":[{"element_id":"25","operator":"eq","value":"CM"}]},"176":{"action":"show","match":"any","rules":[{"element_id":"178","operator":"eq","value":"OH"}]},"20":{"action":"show","match":"any","rules":[{"element_id":"195","operator":"eq","value":"UR"}]},"21":{"action":"show","match":"any","rules":[{"element_id":"195","operator":"eq","value":"UR"}]},"64":{"action":"show","match":"any","rules":[{"element_id":"195","operator":"eq","value":"UR"}]},"152":{"action":"show","match":"any","rules":[{"element_id":"64","operator":"eq","value":"YES"}]},"26":{"action":"show","match":"any","rules":[{"element_id":"64","operator":"eq","value":"YES"}]},"198":{"action":"show","match":"any","rules":[{"element_id":"195","operator":"eq","value":"OR"}]},"196":{"action":"show","match":"any","rules":[{"element_id":"200","operator":"eq","value":"ANE"},{"element_id":"200","operator":"eq","value":"AN"},{"element_id":"200","operator":"eq","value":"AP"},{"element_id":"200","operator":"eq","value":"PI"},{"element_id":"200","operator":"eq","value":"IT"},{"element_id":"200","operator":"eq","value":"NI"},{"element_id":"200","operator":"eq","value":"OPI"},{"element_id":"200","operator":"eq","value":"OP"},{"element_id":"200","operator":"eq","value":"OAN"},{"element_id":"200","operator":"eq","value":"SE\/HY"},{"element_id":"200","operator":"eq","value":"MR"},{"element_id":"200","operator":"eq","value":"OV"}]},"32":{"action":"show","match":"any","rules":[{"element_id":"195","operator":"eq","value":"UR"}]},"37":{"action":"show","match":"any","rules":[{"element_id":"36","operator":"eq","value":"IAN"},{"element_id":"36","operator":"eq","value":"AT"},{"element_id":"36","operator":"eq","value":"AC"},{"element_id":"36","operator":"eq","value":"BB"},{"element_id":"36","operator":"eq","value":"BP"},{"element_id":"36","operator":"eq","value":"IL"},{"element_id":"36","operator":"eq","value":"KM"},{"element_id":"36","operator":"eq","value":"ME"},{"element_id":"36","operator":"eq","value":"NT"},{"element_id":"36","operator":"eq","value":"OE"},{"element_id":"36","operator":"eq","value":"OD"},{"element_id":"36","operator":"eq","value":"OANT"},{"element_id":"36","operator":"eq","value":"SD\/HP"},{"element_id":"36","operator":"eq","value":"DC"},{"element_id":"36","operator":"eq","value":"OT"},{"element_id":"36","operator":"eq","value":"SY"}]},"69":{"action":"show","match":"any","rules":[{"element_id":"68","operator":"eq","value":"YES"}]}},"dependents":{"25":[166],"178":[176],"195":[20,21,64,198,32],"64":[152,26],"200":[196,196,196,196,196,196,196,196,196,196,196,196],"36":[37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37],"68":[69]},"animate":true}; $('#iphorm-5c8a654d95cb0').iPhorm({"id":6,"uniqueId":"5c8a654d95cb0","useAjax":true,"successMessageTimeout":30,"resetFormValues":"clear","clElementIds":[166,176,20,21,64,152,26,198,196,32,37,69],"clDependentElementIds":[25,178,195,64,200,36,68],"centerFancybox":true,"centerFancyboxSpeed":true}); if ($.isFunction($.fn.qtip)) { $('.iphorm-tooltip-hover', iPhorm.instance.$form).qtip({ style: { classes: 'qtip-plain qtip-shadow' }, position: { my: 'left center', at: 'right center', viewport: $(window), adjust: { method: 'shift' } } }); $('.iphorm-tooltip-click', iPhorm.instance.$form).qtip({ style: { classes: 'qtip-plain qtip-shadow' }, position: { my: 'left center', at: 'right center', viewport: $(window), adjust: { method: 'shift' } }, show: { event: 'focus' }, hide: { event: 'unfocus' } }); $('.iphorm-tooltip-icon-hover', iPhorm.instance.$form).qtip({ style: { classes: 'qtip-plain qtip-shadow' }, position: { my: 'left center', at: 'right center', viewport: $(window), adjust: { method: 'shift' } }, content: { text: function (api) { return $(this).find('.iphorm-tooltip-icon-content').html(); } } }); $('.iphorm-tooltip-icon-click', iPhorm.instance.$form).qtip({ style: { classes: 'qtip-plain qtip-shadow' }, position: { my: 'left center', at: 'right center', viewport: $(window), adjust: { method: 'shift' } }, show: { event: 'click' }, hide: { event: 'unfocus' }, content: { text: function (api) { return $(this).find('.iphorm-tooltip-icon-content').html(); } } }); $('.iphorm-labels-inside > .iphorm-element-spacer > label').hover(function () { $(this).siblings('.iphorm-input-wrap').find('.iphorm-tooltip-hover').qtip('show'); }, function () { $(this).siblings('.iphorm-input-wrap').find('.iphorm-tooltip-hover').qtip('hide'); }); } if ($.isFunction($.fn.inFieldLabels)) { $('.iphorm-labels-inside:not(.iphorm-element-wrap-recaptcha) > .iphorm-element-spacer > label', iPhorm.instance.$form).inFieldLabels(); } if ($.isFunction($.fn.datepicker)) { if (!$('#iphorm-jqueryui-theme').length) { var themeUrl = iphormL10n.plugin_url + '/js/jqueryui/themes/smoothness/jquery-ui.min.css?ver=1.12.1'; $('head').append('<link id="iphorm-jqueryui-theme" rel="stylesheet" href="' + themeUrl + '" type="text/css" />'); } } $('.iphorm-group-row > div:last-child:not(:first-child)', iPhorm.instance.$form).add('.iphorm-group-row:last-child', iPhorm.instance.$form).addClass('last-child'); iPhorm.instance.applyAllLogic(true); $('#iphorm-outer-5c8a654d95cb0').css('visibility', 'visible'); }); </script>
March 14, 2019 at 5:29 pm #28780jerkskiParticipantOn the good page where Quform loads, this code below exists. On new pages, where I insert Quform and it doesn’t work, it does not exist:
<script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/jquery.fileupload.min.js?ver=9.18.0'></script> <script type='text/javascript'> /* <![CDATA[ */ var iphormL10n = {"error_submitting_form":"An error occurred submitting the form","upload_too_many":"You have attempted to queue too many files","upload_file_type_not_allowed":"This file type is not allowed","upload_file_too_big":"This file exceeds the maximum upload size","invalid_response":"The response from the server was invalid or malformed","ajax_error":"Ajax error","plugin_url":"https:\/\/domain.com\/wp-content\/plugins\/iphorm-form-builder","ajax_url":"https:\/\/domain.com\/wp-admin\/admin-ajax.php","preview_no_submit":"The form cannot be submitted in the preview"}; /* ]]> */ </script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/jquery.iphorm.js?ver=1.10.0'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/jquery.form.min.js?ver=3.5.1'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/jquery.smooth-scroll.min.js?ver=1.7.2'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/qtip2/jquery.qtip.min.js?ver=2.2.1'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/uniform/jquery.uniform.min.js?ver=2.1.2'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/js/jquery.infieldlabel.min.js?ver=0.1'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/datepicker.min.js?ver=1.11.4'></script> <script type='text/javascript'> jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({"closeText":"Close","currentText":"Today","monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"nextText":"Next","prevText":"Previous","dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"dateFormat":"MM d, yy","firstDay":1,"isRTL":false});}); </script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/iphorm-form-builder/themes/light/rounded.js?ver=1.10.0'></script>
March 14, 2019 at 7:35 pm #28781jerkskiParticipantProblem solved… you may close this again. Found a bit of code hidden in my theme’s custom functions: Commented it out and all good now.
// function my_quform_scripts($enqueue)
// {
// if (!in_array(get_queried_object_id(), array(141, 24, 215)))
// {
// $enqueue = false;
// }
// return $enqueue;
// }
// add_filter(‘iphorm_enqueue_scripts’, ‘my_quform_scripts’);
// add_filter(‘iphorm_enqueue_styles’, ‘my_quform_scripts’);March 18, 2019 at 4:07 pm #28809AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.