saveForm: function() {
$.ajax({
url:"/users/"+this.user.id,
type: "POST",
data : this.user
}
)
}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.
For more options, visit https://groups.google.com/groups/opt_out.
id=3&email=kasper%40testing.com&credential=%5Bobject%20Object%5D
<link rel="import" href="../../polymer-v0.0.20131010/polymer-elements/polymer-ajax/polymer-ajax.html">
<polymer-element name="user-form2" attributes="user"> <template> <form id="myForm"> <fieldset> <label> id <input value="{{user.id}}"/> </label> <label> email <input value="{{user.email}}"/> </label> <label> username <input value="{{user.credential.username}}"/> </label> <label> password <input value="{{user.credential.password}}"/> </label> <button on-click="saveForm">Save</button>
</fieldset> </form> <polymer-ajax id="postUpdates" url="/users/{{user.id}}" handleAs="json" params="{{user}}" response="{{users}}" method="POST"></polymer-ajax> </template> <script> Polymer('user-form2', { saveForm: function() { this.$.postUpdates.url= encodeURI("/users/"+this.user.id); this.$.postUpdates.params= this.user; this.$.postUpdates.go(); }, created: function () { this.user = { id: "", email: "", credential: { username: "", password: "" } } } } ) </script></polymer-element>
Hi Eric Bidelman
This is Praveen Chinta, UI Developer. As of now i need to work with Polymer Forms for my project So kindly Guide me to work with Forms Using Polymer Element Tags.
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/574087cb-524a-4ed1-95cf-4fbd7e301a2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.