I've prepared an example for you. You can check it here (and full page)
The "trick" is to capture the infowindow's data. Infowindow is a Backbone Model, so I worked with its bind method.
.done(function(vis, layers) {
lyr = layers[1];
lyr.infowindow.bind('change', function() {
if ((lyr.infowindow.attributes.content.fields !== undefined) && (lyr.infowindow.attributes.content.fields[4] !== undefined)) {
country = lyr.infowindow.attributes.content.fields[4].value;
pop2005 = lyr.infowindow.attributes.content.fields[7].value;
document.getElementById("inpCountry").value = country;
document.getElementById("inpPop").value = pop2005;
}
});
})
Also, in this example, I'm filling a form with data, as you requested in your post.