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.
<form is="iron-form" id="form" method="post" action="/">
<paper-input name="testinput"></paper-input>
<paper-button raised click="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-form http://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 upcoming paper-forms
Polymer element.
Post a Comment for "How To Submit A Form With Polymer?"