Yes - you've got it. The recent changeable weather has triggered a lot of onion-type plants into running to flower rather than build up the bulb - cut off the flower head as soon as you notice it. The onions will not be as good as if they had never sent up the flower stalk, but at least you'll have onions 