When I submit the form

Submit a Webflow form by its submit button, and wait for the runtime's answer (the success or the error message). Without a name it submits the first visible form; with one it submits the form whose name, data-name, id or aria-label is that text. The form submitted is the one the next success or error steps look at. Fill the fields beforehand with webship-js's "fill in" steps.

Examples

When I submit the form
When we submit the form
And I submit the form
When I submit the "Contact Form" form
And we submit the "Newsletter" form

Pattern

When(/^(I |we )*submit the (?:"([^"]*)" )?form$/, …)

Part of @webship-js/webflow-steps (github.com/webship/webflow-steps), a step pack for Webship-js 2.0.x.