4 ms·
I just checked the MDN docs https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo... The o
by gweinberg 3y ago
I just checked the MDN docs
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo...
The only allowed form methods are get, post, and dialog.
So you can't do put, patch, or delete via a form.
- Turing_Machine 3y agoSure you can. You just can't specify it as a form action. There's nothing to stop you from using form elements to get your user inputs as normal, then wiring up your own "submit" button that calls your own Javascript to use any method you want. JS fetch, for example, lets you put anything you want in the method: field. I think you can even specify custom methods that only have meaning for your specific server-side code.