Skip to main content

Adding custom JavaScript to forms and landing pages

Technical documentation for developers for JavaScript customization

Marcus Warren avatar
Written by Marcus Warren
Updated over a year ago

This help page is intended for technical users with expertise using JavaScript.

The ability to add custom JavaScript is accessible based on user roles.

Standard Javascript

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

jQuery is included in all Envoke templates. For forms that are embedded via Javascript it is included with the following namespace:

nvkForm.jQuery

Example usage:

nvkForm.jQuery(document).ready(function() {});

This ensures there will be no conflicts with other instances of jQuery included on the parent page.

Adding custom Javascript libraries

Include the <script> tag with the javascript library in the template HTML using the "HTML editor" tab.

Use the Javascript section in the "CSS/JS" tab to load and configure the library. Developer access is required to access this page. 

In the example below, a countdown timer plugin is loaded.

Note that wrapping in the jQuery $(document).ready() function may be required

$(document).ready(function() {
  $('#my-count-down-timer').county({ endDateTime: new Date('2022/02/02 14:00:00') });});
Did this answer your question?