Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Form validation with submitbutton outside

Started by Spica 9 years ago · 0 replies · 706 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 themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago