that a button can submit a form, even if it's not inside the <form> tag. It just needs to have a `form` attr that matches the <form>'s `id`. It can also pass a custom post parameter using the `name` and `value` attribute.

This is useful for "Submit _and_ do something else", e.g. Save vs Save and Exit

Follow

Also really cool for having some kind of global navigation where the forward and back buttons are on a totally separate part of the page. No javascript needed!

@edwardloveall Why not just links for that? (I may be misunderstanding something about the user-case.)

@varx great question! For me, links should be idempotent, i.e. not alter any data. The particular use case I had that brought this up was I needed to submit a form in all cases (save, save & next thing, etc.) but then redirect to a different URL. A link wouldn't be the right semantics for all of that combined. Plus, you can't send a post request with a link. 🙂

@edwardloveall Ohh, back/forward like in a survey or a checkout flow, got it. 👍

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!