Inputs inside Web Components do not submit nicely in forms

101 views
Skip to first unread message

orbo...@gmail.com

unread,
Jul 28, 2014, 9:26:34 AM7/28/14
to polym...@googlegroups.com
I wanted to created a checkbox component that wrapped inside an input so that it sends the value when the form is submitted. After several tests, I realized that the form elements (button, select, input) that are placed inside a custom element are not submitted.

Is there a way to overcome this? I would expect custom elements to be able to play nice with forms.




Eric Bidelman

unread,
Jul 28, 2014, 1:28:25 PM7/28/14
to orbo...@gmail.com, polymer-dev
Check out http://stackoverflow.com/questions/24461460/polymer-form-post-data. That has an explanation and a few links to other relevant posts.

There's also a really nice ajax-form element garstasio@ put together:


On Mon, Jul 28, 2014 at 6:26 AM, <orbo...@gmail.com> wrote:
I wanted to created a checkbox component that wrapped inside an input so that it sends the value when the form is submitted. After several tests, I realized that the form elements (button, select, input) that are placed inside a custom element are not submitted.

Is there a way to overcome this? I would expect custom elements to be able to play nice with forms.




Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/fad4c9ba-d34c-49e0-b674-69c0d420335f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages