Answered

Form Builder Error: n.parsley is not a function

I'm posting this in case others run into this issue. The error "n.parsley is not a function" being logged from the Agility.FormBuilder.js would normally indicate an issue loading the parsley.js dependancy. However, this JavaScript actually takes care of loading its own dependancies so it will load parsley for you even if you don't have it already on your site. Instead, double-check any custom JavaScript that you may have running in the Form Builder in Agility CMS (via Code fields) and ensure those aren't throwing any JS errors.

For example, in this particular case, this was the offending code:

$('#agility-form-98219-submit-btn').click(function () {
eventAction: 'Submit', eventLabel: 'HPTPA-form'
}); //98219 is the content id in settings tab of the module //start datalayer
to push formsubmission window.dataLayer = window.dataLayer || [] dataLayer.push({ 'event': 'formSubmission', // 'formType':
'Contact us', // 'formPosition': 'Footer' }); //end })
 
Where the 'eventAction' and 'eventLabel' is not valid JavaScript syntax and throwing an error on parsing.
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post