Skip to content
Sections
Fiesta

form-foot

Choices and actions The controls that pick from options, and the rows that end a form. Each one sits in a padded rst-box, because that is the card a form goes in.

A form's closing row: one primary submit and an optional cancel link. Cancel is an anchor, because leaving a form is navigation.

Each example is live, but its links go nowhere. HTML shows the markup to copy.

Save and cancel

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-form-foot>
  <button rst-btn="primary lg" type="submit">Save post</button>
  <a rst-btn="lg" href="/posts">Back to posts</a>
</div>

In an app this would reach /posts. Here its links and forms go nowhere.

Submit only

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-form-foot>
  <button rst-btn="primary lg" type="submit">Send invitation</button>
</div>

Idle: the button before anything happens

A button that CHANGES something gets a loading state; a button that only reveals something, e.g. a disclosure, a dropdown, a tab, does not. busy.js applies that rule to every submit button in every form, with nothing to opt into.

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-form-foot>
  <button rst-btn="primary lg" type="submit">Publish</button>
  <a rst-btn="lg" href="/posts">Back to posts</a>
</div>

In an app this would reach /posts. Here its links and forms go nowhere.

Working: what busy.js writes on the way out

Only the button that was clicked: every other submit button in the form keeps its name and its value, and the form itself is guarded against a second submit. data-busy="false" opts out, on the form or on one button; data-busy-label replaces the text. With scripts off none of this happens and the form submits exactly as it always did, so a second submit is still your app's job to catch.

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-form-foot>
  <button rst-btn="primary lg" type="submit" aria-busy="true" disabled>
    <span rst-spin aria-hidden="true"></span>
    Publish
  </button>
  <a rst-btn="lg" href="/posts">Back to posts</a>
</div>

In an app this would reach /posts. Here its links and forms go nowhere.