Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

[SS 2.4] How to create a tutorial poll form with multiple values?


Reply


453 Views

Avatar
Imploosio

Community Member, 5 Posts

1 October 2012 at 2:33am

Hi,

I'm trying to re-create a poll similar to what is described in this tutorial: http://doc.silverstripe.org/framework/en/2.4/tutorials/3-forms

However, I need to use checkboxes instead of radio buttons to allow multiple answers (CheckboxSetField instead of OptionsetField). I'm a little stumped on what would be the best way to save and process the values, I've tried to change the submission model into has_many or many_many in hopes of eliminating the need to save data into the database in comma separated values.

What is the best way to do this? To save the data into a database in correct format and spit it out as a neat little bar graph just like in the original tutorial? Any help is highly appreciated.