Skip to content Skip to sidebar Skip to footer

Polymer Iron-form Not Submitting

I am using the iron-form in Polymer 1.0 to submit a login form with paper-inputs and a paper-button. I am calling submit() on the buttons onclick, but nothing happens. I even tried

Solution 1:

The iron-form element submits your request via AJAX (https://github.com/PolymerElements/iron-form/blob/master/iron-form.html#L146). In other words, it's not going to do a full page refresh like the traditional <form> element (which seems like the behavior you're expecting). It's just getting and fetching data.

I've asked the team if it would be possible to create a flag on the iron-form element so users can still get the benefit of having it submit their custom element values in the request, but force it to use the old form behavior where it does a full page refresh (allowing the server to render and send down a new page).

edit

I'd recommend that you replace iron-form in your example with a regular form element, then write the values from your paper-* elements into input type="hidden" fields, and use those to submit the form.

Post a Comment for "Polymer Iron-form Not Submitting"