I have been trying to use iron-form with a post method and i have some doubts on how does it works or even if I should be using it at all in some cases. So I am trying to find the answer to the following questions:
From what I understand, iron-form is only used for Ajax requests, so to make a regular post (that refreshes the page), I should not be using it, right? (True/False)
If I do not use the
is='iron-form'
, is there any other way to validate fields for paper-input for example?(Now this is what confuses me the most.) Using the iron-form with the post method, I only get the form data as
"formData: [object Object]"
, which makes things totally useless on the backend that does not get the form element values ever.Such behaviour can be seen on the iron-form demo page https://elements.polymer-project.org/elements/iron-form?view=demo:demo/index.html
Is there any way to send a post using iron-form and keep the regular post behaviour?
On searching on StackOverflow, this thread seems to take care of a similar problem Sending form with POST method and Polymer iron-form?, although the 'fix' did not work for me as I seem to be using the 1.0.8 version.
bower iron-form#^1.0.0 validate 1.0.8 against git://github.com/PolymerElements/iron-form.git#^1.0.0
The reason for the formData: [object Object] So it seems that the problem is solved in iron-ajax#1.0.4 I am using bower with PolymerElements/iron-elements as a dependency that only bumps until the version 1.0.0 of iron-ajax, once i forced iron-ajax to use v1.0.4 the the Payload from the form post seems to be corrected.
This issue is what drove me there https://github.com/PolymerElements/iron-ajax/pull/80