Question about auto populating a form

Question about auto populating a form

I am working on updating some internal web based applications. I am doing some slick stuff in jQuery like directory listings and using Flexigrid.

I am running into a brick wall though with one specific problem.

We have a form that is filled out and then a price quote is returned to the user. Not that complicated, but. the form that they fill out is dynamic.

for example, the form starts out with one div that gets filled out. As the user requires more information to be input they basically spawn a new div using a java script function.

I was challenged with giving this app the ability to go back and edit / add / remove information from the original form.

I guess my question boils down to this....

Is there something in jQuery or can someone point me in the right direction on how to rebuild this form, so that it can easily be accessed and re-populated using existing information?

I am thinking that if I can feed the form results into a json array, I can use that to repopulate, but I'm not even really sure where to start.

I have the ability to completely rework the form if necessary (which I believe it will be). So I'm not worried about having to hack in a solution.

Thanks in advance for any help you can provide.

Cheers,
C