To make this I attached a piece of sheet metal (2"x48"x1/8") to the underside of the cupboard (I used Elmers Ultimate Glue and had it held in place for 24 hours with c-clamps... I put paper down on the counter and sink to catch drips).
Strong magnets were attached to the lids of spice jars using a hot glue gun. I wrote the spice names on address labels and pasted them on the jars.
When all was dry, the jars were attached to the underside of the cupboard with the magnets. They are easy to retrieve when needed and easy to put back when finished.
Currently there are 20 spice jars (seen here) but I have room for 7 more on this piece of metal and will be adding at least 3 more to this group.