Form hides error message on submit

  • Deralict
    Asked on January 24, 2015 at 7:49 PM

    If I fill in my form but neglect to fill in a required field that is no longer visible in the viewport, when Submit is pressed the form scrolls up slightly so that the error message (stating a required field has not been filled in) is not visible. The user is left wondering why the form isn't submitting (and will typically keep pressing the submit button) until they happen to scroll down to see the error message. Why doe sit scroll up at all--if it didn't do that it wouldn't be a problem?

  • Ben
    Replied on January 25, 2015 at 3:13 AM

    I agree that without seeing the message it could be a bit puzzling (if the question above it is not the one that is missed).

    I would suggest using one of the 2 CSS codes I will give.

    1st - move the error notification above the submit button

    #id_61 .form-button-error {
        position: relative;
        top: -120px;
    }

    Form hides error message on submit Image 1 Screenshot 30

    2nd - shown the error as a form of footer

    #id_61 .form-button-error {
        background-image: linear-gradient(orange, orange, red);
        border-radius: 30px 30px 0 0;
        bottom: 0;
        font-weight: bold;
        left: 20%;
        line-height: 30px;
        position: fixed;
        right: 20%;
        text-shadow: 1px 1px 1px black, -1px -1px 1px black;
        z-index: 1000;
    }

    Form hides error message on submit Image 2 Screenshot 41

    The first code will simply move the text error above the button and will stay there, while the second code will scroll as the user scrolls as well, showing that there is an error no matter where the scroll takes them, or even if they scroll to the top right after hitting submit.

    You can apply either of the CSS codes by following these steps: Inject Custom CSS Codes