I was looking for an answer to much the same question not too long ago. I found all sorts of tutorials showing how to populate a 2nd drop down menu based upon the contents of the first (such as http://pullmonkey.com/2008/3/30/dynamic-select-boxes-ruby-on-rails). Ultimately, I was able to learn enough from reading those to learn that (in your case) I would want to put a blank
tag in my layout where I would want the “name of guest” stuff to appear, and to populate the “name of guest” stuff only when quantity == 2.
I hope this helps.
–wpd