-
Notifications
You must be signed in to change notification settings - Fork 81
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
What is the API a custom element must use to be iron-form compatible? #217
Comments
I'm still learning polymer and trying to use iron-form myself. I don't think iron-form utilizes on-change other than in that demo. Your custom-element should probably dispatch a change event with bubbles and composed set to true if you want to watch the on change event like that demo example to be received past a shadow dom barrior. Otherwise I think there are two types of interfaces. When a form is submitted first the validatable elements are validated, if the form is valid, then the submittable elements are serialized and submitted: validatable elements
submittable elements
|
Thanks so much for the research summary @ianjosephwilson. I like the idea of everything submittable having both I've proposed in the Also weird in standard HTML, checkbox and their In regards to validating elements, |
@ianjosephwilson I'm working on a project for the next 8 months that relies on form elements in Polymer for the next 8 months. If you are also working on this actively we should hangout! Feel free to reach out to me at [email protected] or [email protected]. |
I figured it would be having
name
andvalue
attributes and dispatching achange
event but I see that<iron-form onchange="...">...
doesn't fire when my custom elements dispatchchange
event. I also have to figure out the API for validation. I tried reading through theiron-form
code but I've been unable to figure out the API. Can anyone help point me in the right direction?The text was updated successfully, but these errors were encountered: