Do fill out the medical forms ahead of time. As mentioned above, they can't just run out to the store.
My niece is not really allergic to dairy, but has problems with drinking milk, so she drinks soy milk at home. Because it wasn't really an allergy, my sister did not fill out the medical forms in advance. My niece started to not feel well after two days on board when my sister realized that she had been drinking regular milk. She asked about soy milk and on that cruise there was none. They indicated that if they had known in advance they would have been happy to supply it, but no one on that cruise required it, so they didn't have any on board.
They did have lactose free milk, which we switched my niece to and she was fine after that. Just because you read on here that they had such and such on board for someone else's cruise, doesn't mean they will have it for yours unless you tell them in advance you need it.