Getting started

How to use JavaScript and CSS snippets

Adding JavaScript and CSS is powerful way customize the look and functionality of your survey. You can, for example, changing button text on a certain form page, or [another snippet example](-url to another snippet example-).

How to add JavaScript to your survey

  1. Open your survey, navigate to Build view and click Settings
1853
  1. Click Snippets tab in Settings popup
1854
  1. Write your script and click Save
1852
🚧

jQuery

jQuery is available for the snippets. It's a good practice put your script inside a ready handler to ensure that the document has fully loaded before the script is run.

jQuery(document).ready(function() {
    //Your code here
});

or

$(function() {
    //Your code here
});
  1. Navigate to Preview and verify that your script works
1856 1853

How to add CSS to your survey

  1. Navigate to Design view and click Custom CSS (</>)
1852
  1. Add your styles to the bottom of the CSS. Changes will be applied immediately.
1851
  1. Save the survey and you're good to go!
1853