Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Form validation with submitbutton outside

Started by Spica 9 years ago · 0 replies · 632 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 Andy Miller, 6 days ago
0 105 6 days ago
General · by lynbor, 4 weeks ago
3 436 2 weeks ago
General · by lynbor, 3 weeks ago
7 555 2 weeks ago
General · by Harry, 2 weeks ago
0 159 2 weeks ago
General · by Old Man Umby, 1 month ago
2 308 3 weeks ago