Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Form validation with submitbutton outside

Started by Spica 9 years ago · 0 replies · 565 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 jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 311 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 265 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago