Phoenix dynamically generate radio buttons

What about using a list comprehension?

https://hexdocs.pm/phoenix/templates.html#examples

scan down to Displaying Lists