Yes you can plant them, they will grow and the flowers look something like a dandelion. Collecting the seeds from onion flowers can be tricky. I've never managed to collect the seeds, though I have tried.
"Knit on, with confidence and hope, through all crises."
- Elizabeth Zimmermann