Hi Twood. It is the skin and the neck of the onion (where the bulb meets the leaves) that you need to get dry for them to store. That's why ones that have tried to flower don't keep well - they have a flowering stem in the neck that is hard to get dried off enough. As Mr Dog says, they are perfectly good eating, so pick them now if you want.
For the rest, wait until the leaves die back and then lift with the remains of the leaves on them. Knock soil off the roots, but no need to trim at this stage. Dry them further before final storage, I use trays in my shed, but they don't have to be inside,just dry and with air moving round them. The greenhouse is usually too hot for this.
Once you are happy they are dry, you can use the dried leaves to plait them, or just remove them and store the onions in net sacks. If you ask at the garden centre, loose autumn bulbs come in net sacks, so you might get some for free. The daffs start arriving late august, so worth putting feelers out to see if they will save you the sacks when they tip the bulbs out for sale