not sure is the right place for this question, but let’s try.
I’m building a tool that generates custom fields. Specifically I’m working on the radio buttons.
The current strategy is to list the radio field settings in a table and all choices in another one. Then a the actual radio buttons are stored in radios.
Associations
field setting --has_many-->
choices
field setting --has_many-->
radios
radio --has_many-->
choices
Example
Lets say we have:
- field setting: genre
- choices: male / female
- radio: Paul genre
We associate Paul genre to Male.
Issues
1) If I delete male choice, then Paul genre must automatically become female? It’s a radio, there must be a choice…
2) If I delete both male and female before adding some other choices (let’s say man and woman) what would be Paul genre? Should it be empty? But then on UI the user will see one of the new one selected, so should I select randomly? But then how can the user rely on the previously radio he created (let’s say they are 100000): will all become man?
Possible solution
Should be mandatory to have None choice? See this thread