I can tell you off the top of my head it is pretty complex that portion of the code and easily breakable. The main issue here is the the problem is the selection is not empty. You would easily get empty input boxes and select boxes to not appear but with checkboxes and radio buttons where you have multiple entries its quite impossible.
You can edit showphoto.tmpl and add the code in bold to the line noted to make select and input boxes that are empty not to appear.
Code:
Content visible to verified customers only.