unpoly
unpoly copied to clipboard
Respect unpoly attributes on form submitters
Bug description
the HTML form submit event has a submitter property on all modern browsers. Builtin up attributes such as up-target are not respected if present on the submitter.
Expected behavior
up attributes on submitter override attributes on form.
Additional context
Not a bug, but this would be a useful feature for anyone who likes to overload forms with lots of actions.
I couldn't understand this. Can you provide examples?
I couldn't understand this. Can you provide examples?
A form submitter is any button or input that is used to submit the form.
for example
<form>
<button formmethod="post" formaction="/press/button1">Press Me!</button>
<button formmethod="post" formaction="/press/button2">No Press Me!</button>
</form>
If up-target is specified on the submitter, in this case the button. It will not be respected.