Prevent the Enter key from Submitting a Page or Survey
By default, in every web browser, the Enter key tells a web browser to submit a form. 

In the case of your survey, you might want to disable this functionality. While this isn't guaranteed to work on every device and web browser, you can try this to reduce the changes of a user pressing Enter and submitting their survey response.

1. First, you must create a custom template. You can copy the default template if you don't already have a custom template. To get started, go to Configuration->Template Editor.

2. In your custom template, look for the file scripts/template.js:



3. Scroll to the very bottom of the file on the right. 

4. Paste the following lines of code into the JS file, and click Save:

$(document).ready(function() {
    $('input').on('keydown keypress', function(e) {       
        if(e.keyCode === 13) {
            return false;
        }      
    });
});
5. Go to your survey, and under Survey Properties->General Settings, under the panel General, set your survey template to your custom template. 



20 of 53 people found this helpful.   




Powered by LiveZilla Live Chat