Comments (2)
I've also noticed that the submit button/element does not appear in formData object on submission events.
If a button is used to submit a form and also includes a name/value pair, it should be in FormData.
Example
// JS
document
.querySelector("form")
.addEventListener("submit", (event) => {
let formData = new FormData(event.currentTarget);
formData.get('FirstButton') // should be reference to <button/> but is undefined
});
// HTML
<form>
<button name='FirstButton' value='FirstValue'>First</button> // Click
<button name='SecondButton' value='SecondValue'>Second</button>
</form>
from form-participation.
I think this is a good feature request. I think that the submit()
function could be updated to accept an optional submitter
param, and also be updated to conditionally use form.requestSubmit(submitter)
if it is available?
Regarding the request about FormData
, the submitter is the second arg to new FormData(form, submitter)
so when creating a FormData
, you can add the submitter.
However, I think maybe the formValues()
helper could also be updated to accept an optional submitter
param so that param can be passed to the new FormData()
construction that happens in formValues()
from form-participation.
Related Issues (14)
- Port Duet date-picker to Lit HOT 15
- Uncaught (in promise) Error using classfield with a new vite lit-ts project HOT 2
- Async custom validators HOT 3
- Generated events require "bubbles" prop for event delegation
- Catching form submit and showing validation errors HOT 27
- `@open-wc/form-control` package not published as ESM module HOT 1
- Validator attribute required? HOT 1
- FormControlMixin causes build failures on server/Lit SSR HOT 5
- Not associating with form in React? HOT 9
- formControlValidationGroup implementation missing HOT 4
- TypeError: this.attachInternals is not a function HOT 2
- Change setValue method in FormControlMixin to limit TS visibility HOT 6
- ElementInternals states are now widely supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form-participation.