I am generating 2 json object by using the java script mentioned below.I am populating my json to the form fields, now the problem is I can display only one at a time, how to display the other json in a form at the same time?
//first json :
{"vIRnumber":"195412","dReceivedDate":"2012-06-06","vDescription":"GP Coils","fThickness":"888","fWidth":"4566","fQuantity":"122","vStatus":"work in progress"}
//second json:
{"vIRnumber":"45","dReceivedDate":"2012-04-26","dDate":"0000-00-00","dStartDate":null,"nPartyName":"Aasha","vDescription":"MS Channels","fThickness":"1.8","fWidth":"1220","fQuantity":"34523"}
//**i am filling the fields using the javascript below:**
var json =<?php echo($data); ?>;
for(key in json)
{
if(json.hasOwnProperty(key))
$('input[name='+key+']').val(json[key]);
}
For displaying the first json you could add the values next to the form item for example
Load the first json in the div for displaying current value
For passing/saving the two json for submitting the form or processing other stuff you could try
or use 2 forms the first with the values of the first json, but can’t be edited/submitted only for viewing/reference and 2nd form for editing/submitting.
You can try to do more like
comparison for changes