Retrieve Form JSon Data for saving & How to restore the form for editing

162 views
Skip to first unread message

Jayaraman Kumar

unread,
Jan 23, 2013, 1:30:26 PM1/23/13
to jquery-form-b...@googlegroups.com
Hi,

Can i retrieve form Json Data for saving to an db.
the same time. how do i restore the json data for updating the form.

Many time this question been asked . if i can get a code sample would be very helpful.

Thanks in advance.

Brett Hirst

unread,
Jan 23, 2013, 5:07:08 PM1/23/13
to jquery-form-b...@googlegroups.com
You need to return the json and write some jquery that reconstructs your form. 

Chee Kin Lim

unread,
Jan 23, 2013, 9:45:22 PM1/23/13
to jquery-form-b...@googlegroups.com
Sorry for slow response.

You may reconstruct the form at server side, that's what I do in Grails project at http://code.google.com/p/grails-form-builder-plugin/, you can find a basic documents there and the source code.

Hope this help.

Best regards,
Chee Kin

Jayaraman Kumar

unread,
Jan 24, 2013, 4:57:11 AM1/24/13
to jquery-form-b...@googlegroups.com
Hi,

Thanks for you response.

I know now, there is some object built whenever there is an new field added to the form.

If you could tell me that from where i can get the result JSON.

one more thing, there is no existing code available to load the form again for editing. we need to construct on our own.


Is my understand correct?

Thanks.

Chee Kin Lim

unread,
Jan 24, 2013, 5:16:50 AM1/24/13
to jquery-form-b...@googlegroups.com
Hi,

Please spend some times reading the documentation, each new field render in Builder Panel has set of hidden fields (input type="hidden") to store the field's properties which will submit to server-side and store in DB. The design document at http://code.google.com/p/jquery-form-builder-plugin/wiki/Design#Technical_Design did mentioned it.

The form constructed using server-side code, please see http://code.google.com/p/grails-form-builder-plugin/source/browse/trunk/grails-app/services/org/grails/formbuilder/FormTemplateService.groovy


Hope this help.

Best regards,
Chee Kin



Reply all
Reply to author
Forward
0 new messages