Despite what Marcus Waring says, most farmers don't cut off potato flowers, as it makes no appreciable difference to the yield, but increases their work & costs.....
Flowering usually indicates that tubers are beginning to fatten up beneath the soil, so if you cut the tops off then, you'll only have small sized tubers....perhaps that is what Marcus/you want, for salads?
If you want them a normal size or main-crop potatoes for storing, leave them until the top growth dies back, before digging.