How To Submit A Form With Polymer?
Solution 1:
Try the ajax-form element: http://ajax-form.raynicholus.com.
It supports the paper elements.
Solution 2:
For any future Readers, now that 1.0 is released:
This is basic html form processing. At the time of this writing, Polymer now has the iron-form, but you still submit it like any other form.
<formis="iron-form"id="form"method="post"action="/"><paper-inputname="testinput"></paper-input><paper-buttonraisedclick="document.getElementById('form').submit();">
Post
</paper-button></form>
Solution 3:
From Polymer's blog: https://blog.polymer-project.org/featured/2014/09/23/featured-002/
Ray Nicholus’ ajax-form element provides a simple way to submit forms. ajax-form works with traditional form elements, as well as any custom elements that have both a name attribute and a value – including the Core and Paper input elements.
https://github.com/rnicholus/ajax-formhttp://ajax-form.raynicholus.com
Solution 4:
Since, as you pointed out, paper-button
s do not extend the native button
element, you will have to either write your own JavaScript to handle form submission or wait for the upcomingpaper-forms
Polymer element.
Post a Comment for "How To Submit A Form With Polymer?"