Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Form validation with submitbutton outside

Started by Spica 9 years ago · 0 replies · 597 views
9 years ago

I have problems with a form and a submitbutton outside the form tag.
I submit the form via js

JS
$('#myformbutton').on('click', function(event) {
        event.preventDefault();
        $('#myform').submit();
    });

The form gets submitted when validation ok. But I do not get the inline validation with its messeages on a failure with the specific fields messeages. I just get the response ”FORM.VALIDATION_FAIL". So how to process the form validation from outside the form tag?

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 1 week ago
4 181 2 days ago
General · by lynbor, 6 days ago
2 122 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 1 week ago
1 124 1 week ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago