that represent an option list organized in categories; each of this option has a particular point cost eg
id 1
name test
points 1
category_id 1
id 2
name wooo
points 4
category_id 5
now i want to display these options organized by categories, in each category the option will be displayed through radio button in order to make the decision exclusive for the particular category; the user will have 10 points to spend and i want to show via ajax check the remaining points each time the user select or deselect an option.
I though to create a form model in order to manage this form but i can’t figure it out how… can anyone give me a hint?
ok, i’ll try to explain better what i mean: i’m trying to make an online game, and i’m coding the user race creation page; in the table shown are contained all the race tratis available.
In the race creation page all of these traits are organized in tabs each of them representing a particular category, eg. race fertility or race government, in order to let the user choose among the available options for that particular category.
That’s why i need to make the choice exclusive for the category and that’s why i use radio buttons: i can’t let the user choose, for example, both imperialism and dictatorship for the kind of government and in the meantime i need to diplay the remainig race points to spend and the race points spent.
I’m trying to figure out how can i organize a form model in order to suit this situation.
Well the form model will help you validate, but I’m not sure you’re going to be able to get the dynamic action that you want within a single request context without coding some javascript by hand or implementing your own widgets.