View Full Version : Loda Form from JS Object?

28 Aug 2010, 5:50 PM
I see examples and methodology for loading a form from a url that returns javascript in a format wrapped with the success and data attribs. I have two questions:

1) Can I customize the form to accept a JSON return without the success flag (if it returned data, it was a success)? I could write some code in the success handler to test whether it REALLY succeeded.

2) While most of the time I will be getting my data from the server in this way, there are a few situations where the data I want in the form is already loaded in a local object. I'd like to hand that object to the form and have it perform the same name-mapping load it does when it gets data from the server. I don't see the load method taking that. Is there a way to do that?

29 Aug 2010, 1:36 AM
Check the docs first: