Skip to main content
Act-On Software

Resolving a JavaScript or jQuery Conflict in the Form Builder

 

If you have created content containing jQuery and are seeing the Next or Save buttons no longer function in the Act-On form editor or if the Submit button disappears when clicked, this is typically caused by a JavaScript library conflict. Most often, this is due to a jQuery conflict with Prototype, because Act-On forms make use of the JavaScript Prototype library.

If the trouble is isolated to the usage of your JavaScript-enhanced custom stationery or custom content, the following jQuery conflict-avoidance function solves the trouble the majority of the time:

jQuery.noConflict();
jQuery(document).ready(function ( $ ) {
  // your script goes here to execute once the document loads
});

In short, because we are referencing your jQuery file after Prototype has been referenced (Prototype is automatically referenced in the system-generated form header), the $ alias used by jQuery is associated with Prototype, and both libraries share $ by default. "jQuery.noConflict()" releases the $ globally, and "jQuery(document).ready(function ( $ ) {" uses the $ as a locally-scoped alias, enabling you to run your jQuery 'as-is' without further changes.

This article in Jquery's documentation provides additional details.

If the above solution, or other methods provided within the jQuery documentation, does not solve the issue, please contact Act-On support.

  • Was this article helpful?