Issue on Accordion Look

Issue on Accordion Look

How could I resolve the following issues:

1. Problem:

    Actual:


2. I need to fill the form fields with the selected value's record from autocomplete. currently I have 80 fileds where I am setting the vaues as 
                                        $( "#abcd" ).val(data[0].abcd);
            $( "#efgh" ).val(data[0].efgh);
            $( "#ijkl" ).val(data[0].ijkl);
Doing so I should give values for all the fields as above. There may be a chance that we can increase the fields in future where it may go to hundreads. 
Instead I want to set all the values using few lines so that if there is a need to add or remove fields I need not to change the code. Is it anything like I can set it to an object so that it will fill all the fields automatically.

Thanks,
Chiranjeevi.