We needed to move a bed onto the main floor of our home after my wife had surgery. Since it's not a normal bedroom, it wasn't well set up for it but there was a nice metal surface next to the bed. So I made this magnetic shelf that we could move around freely.
Objects in image are for strength demonstration (tape measure & stapler):
What you need to know:
You can use anywhere from 2 - 9 magnets. Just use the magnet holes that you want.
You will need all 9 magnets if you want it to hold much weight.
For reference, mine will hold a phone and a can of pop, but it won't hold a large water bottle.
Pro tip if you want it to hold more weight: The 9 magnets hold strongly but on a smooth metal surface the shelf can still slide down. Adding something tacky to the back creates friction and stops it from sliding as easily. I did this by accident by using modelling glue to hold the magnets in on one shelf. It left a rubbery feeling surface on the back - and that shelf holds more weight. So being sloppy was accidentally a good thing.
Print in place, just glue in some magnets.
If you could purchase your magnets from my link it would be appreciated :)