Repurposed bits of David's code so that about five fields show up by default for each record, and all the rest are hidden by default and show up only if user clicks a button.
Also tidied up behaviour if no results are returned, made a few other modifications to code to normalize behaviour and presentation.