<p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), the user agent must
<p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), optionally with a
<var title="">scripted-submit</var> flag set, the user agent must
run the following steps:</p>
<ol><li id=sandboxSubmitBlocked><p>If <var title="">form</var> is in
<!-- lock (implicit in previous step) -->
<li><p>If the <var title="">submitter</var> is anything but a
<code><a href=#the-form-element>form</a></code> element, and the <var title="">submitter</var>
state</a> is false, then <a href=#interactively-validate-the-constraints>interactively validate the
constraints</a> of <var title="">form</var> and examine the
result: if the result is negative (the constraint validation
concluded that there were invalid fields and probably informed the
user of this) then abort these steps.</li>
<li><p>If the <var title="">submitter</var> is anything but a
<code><a href=#the-form-element>form</a></code> element, then <a href=#fire-a-simple-event>fire a simple event</a>
that is cancelable called <code title=event-submit>submit</code>,
at <var title="">form</var>. If the event's default action is
prevented (i.e. if the event is canceled) then abort these
steps. Otherwise, continue (effectively the default action is to
perform the submission).</li>
<li><p>If the <var title="">scripted-submit</var> flag is not set,
and the <var title="">submitter</var> element's <a href=#concept-fs-novalidate title=concept-fs-novalidate>no-validate state</a> is false,
then <a href=#interactively-validate-the-constraints>interactively validate the constraints</a> of <var title="">form</var> and examine the result: if the result is
negative (the constraint validation concluded that there were
invalid fields and probably informed the user of this) then abort
these steps.</li>
<li><p>If the <var title="">scripted-submit</var> flag is not set,
then <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable called
<code title=event-submit>submit</code>, at <var title="">form</var>. If the event's default action is prevented
(i.e. if the event is canceled) then abort these steps. Otherwise,
continue (effectively the default action is to perform the
submission).</li>
<!-- if you add any steps between the "lock" and "unlock" lines,
make sure to update the step immediately before the "lock" line -->