-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormData & submitter[formaction] #381
Comments
It seems this would be rather magical as https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-the-form-data-set has an early return for an empty form. I guess we would have to pretend that the form contains the submitter in this case. Perhaps you could elaborate on when this kind of thing has come up? |
Sorry, my bad... Honestly, I just discovered that requirement: "Does nothing if there is no form owner." Then a submitter can't be standalone, invalidating my question. I'm self-asking why that required dependency but don't want to annoy you longer with that. Thanks anyway. |
You're not annoying me! Just curious. I think the dependency is there because we get the fields from the form and then the submitter identifies the field that is the submitter. As I suggested above we could potentially invert some of that, but would need a compelling use case and some signal of web developer demand. |
Ok, ok :) In fact, actually, the idea behind to use them, as standalone, is to replace some anchors by some
And, really, I'm not convinced about the need of an extra form, trailing somewhere in the page to be able to send one of these buttons requests... moreover since it requires an id, "polluting" the |
Alright, let's reopen this to see if more people hit this or if we find it to be a common library pattern or Stack Overflow question. Thanks! |
Thanks a lot for that shared curiosity :) |
Hi,
Is it possible to improve the behavior spec about the
new FormData(form, submitter)
, to simply support something like this, please?Using a submitter like:
Imho, if the button is a standalone submitter, there is no reason to be owned by a form to use it as a
FormData
submitter.Any thoughts about that idea?
The text was updated successfully, but these errors were encountered: