Attempting to DISABLE the "Enter" button on a form. I am calling the

Attempting to DISABLE the "Enter" button on a form. I am calling the following function from the load event of the form...

function disableEnter() {
var form = document.getElementsByTagName("form")[0];
form.onkeypress = function () {var e = event;var code = (e.keyCode) ? e.keyCode : e.which;
if (e.srcElement.type != "textarea" && (code == 13 || code == 3) )
{return false;}
else
{formListener(event)}
}
}

...I found that the ENTER button does indeed get disabled ONLY when testing the form by monitoring the process and viewing the form from the process designer. It does not seem to work when testing the form from the Application portal. Is there something different as to how Appian executes javascript when viewing the form from the process designer vs. the application? Also, a note that unfortunatly I am not able to use Tempo at this time, javascript is currently my only option. Thoughts?...

OriginalPostID-110821

OriginalPostID-110821

  Discussion posts and replies are publicly visible

Parents
  • A permanent solution is to use Tempo/SAIL forms, they have the enter key disabled for form submission by default. This will definitely save you a lot of trouble since it will work on any compatible browser.

    On the other hand if you can't use Tempo/SAIL forms for the time being, would you mind testing if the attached application shows the behavior you describe? it works for me. Here's how to test: launch an instance of Submit Disabled for Enter Key, open the task from Tasks view in /suite/apps.
Reply
  • A permanent solution is to use Tempo/SAIL forms, they have the enter key disabled for form submission by default. This will definitely save you a lot of trouble since it will work on any compatible browser.

    On the other hand if you can't use Tempo/SAIL forms for the time being, would you mind testing if the attached application shows the behavior you describe? it works for me. Here's how to test: launch an instance of Submit Disabled for Enter Key, open the task from Tasks view in /suite/apps.
Children
No Data