Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 597 posts 2395 karma points
    May 20, 2020 @ 08:38
    Bo Jacobsen
    0

    Umbraco Forms only submit on ENTER when submit is marked.

    Hi All.

    Using Umbraco Forms 4.4.7

    Is there an easy to way to only allow forms submit with the keyboard key ENTER, when the submit button is marked?

    Or what do others do?

    $(document).on("keydown", "form", function (event) {
        if (event.key === "Enter") {
            var target = $(event.target);
            if (target.attr("type") === "submit" || target.is("a") || target.is("select") || target.is("textarea")) {
                return true;
            }
            else {
                return false;
            }
        }
        return true;
    });
    
Please Sign in or register to post replies

Write your reply to:

Draft