From: Jim B. <jp...@si...> - 2008-06-22 11:19:26
|
Hi all, Has anyone hacked around with radio boxes and groups? I'm trying to create a survey question that has three groups of responses, something like the following: Q: Please check your favorite item in each category: [ ] Red Roses [ ] Blue Violets [ ] White Carnations [ ] Red Strawberries [ ] Blue Berries [ ] White Grapes [ ] Red Sandals [ ] Blue Slippers [ ] White Flipflops The ideal way to do this is setting the name attribute for each group: <input type="radio" name="Q1_A" value="RedRoses"> Red Roses<br> <input type="radio" name="Q1_A" value="BlueViolets"> Blue Violets<br> <input type="radio" name="Q1_A" value="WhiteCarnations"> White Carnations <hr> <input type="radio" name="Q1_B" value="RedStrawberries"> Red Strawberries<br> <input type="radio" name="Q1_B" value="BlueBerries"> Blue Berries<br> <input type="radio" name="Q1_B" value="whiteGrapes"> White Grapes <hr> <input type="radio" name="Q1_C" value="RedSandals"> Red Sandals<br> <input type="radio" name="Q1_C" value="BlueSlippers"> Blue Slippers<br> <input type="radio" name="Q1_C" value="WhiteFlipflops"> White Flipflops Has anyone hacked phpESP to do this sort of thing? Best Regards, Jim B. PS- Yes, I know I can use checkboxes... |
From: Franky V. L. <lie...@te...> - 2008-06-22 18:10:20
|
On Sun, 22 Jun 2008 07:03:11 -0400 Jim Brown <jp...@si...> wrote: > > Hi all, > > Has anyone hacked around with radio boxes and groups? > > I'm trying to create a survey question that has three groups > of responses, something like the following: > > Q: Please check your favorite item in each category: > > [ ] Red Roses > [ ] Blue Violets > [ ] White Carnations > > [ ] Red Strawberries > [ ] Blue Berries > [ ] White Grapes > > [ ] Red Sandals > [ ] Blue Slippers > [ ] White Flipflops If I'm not mistaken, radio buttons in html are not meant to be used like this ... But anyway, to try it out: add 2 <br> add the end of every "seperation" line (yes, I mean to add the html code to the description field in phpESP. Franky |
From: Jim B. <jp...@si...> - 2008-06-22 19:44:20
|
* Franky Van Liedekerke <lie...@te...> [2008-06-22 13:54]: > On Sun, 22 Jun 2008 07:03:11 -0400 > Jim Brown <jp...@si...> wrote: > > > > > Hi all, > > > > Has anyone hacked around with radio boxes and groups? > > > > I'm trying to create a survey question that has three groups > > of responses, something like the following: > > > > Q: Please check your favorite item in each category: > > > > [ ] Red Roses > > [ ] Blue Violets > > [ ] White Carnations > > > > [ ] Red Strawberries > > [ ] Blue Berries > > [ ] White Grapes > > > > [ ] Red Sandals > > [ ] Blue Slippers > > [ ] White Flipflops > > If I'm not mistaken, radio buttons in html are not meant to be used > like this ... > But anyway, to try it out: add 2 <br> add the end of every "seperation" > line (yes, I mean to add the html code to the description field in > phpESP. > > Franky That only separates the groups for display. What I had in mind was creating a new question type like 'radiogroup'. phpESP would have to: 1. Manage the creation of separate groups with "name=group1" attributes This would be in the Survey Design management interface screen. 2. Receive and process the groups as 'response_multiples' instead of response_single. Not sure of all the underlying code and I'm short on time right now, but I might give it a try later. Best Regards, Jim B. |
From: Franky V. L. <lie...@te...> - 2008-06-22 21:41:09
|
On Sun, 22 Jun 2008 15:28:05 -0400 Jim Brown <jp...@si...> wrote: > * Franky Van Liedekerke <lie...@te...> [2008-06-22 13:54]: > > On Sun, 22 Jun 2008 07:03:11 -0400 > > Jim Brown <jp...@si...> wrote: > > > > > > > > Hi all, > > > > > > Has anyone hacked around with radio boxes and groups? > > > > > > I'm trying to create a survey question that has three groups > > > of responses, something like the following: > > > > > > Q: Please check your favorite item in each category: > > > > > > [ ] Red Roses > > > [ ] Blue Violets > > > [ ] White Carnations > > > > > > [ ] Red Strawberries > > > [ ] Blue Berries > > > [ ] White Grapes > > > > > > [ ] Red Sandals > > > [ ] Blue Slippers > > > [ ] White Flipflops > > > > If I'm not mistaken, radio buttons in html are not meant to be used > > like this ... > > But anyway, to try it out: add 2 <br> add the end of every > > "seperation" line (yes, I mean to add the html code to the > > description field in phpESP. > > > > Franky > > > That only separates the groups for display. > > What I had in mind was creating a new question type like > 'radiogroup'. phpESP would have to: > > 1. Manage the creation of separate groups with "name=group1" > attributes This would be in the Survey Design management interface > screen. > > > 2. Receive and process the groups as 'response_multiples' instead of > response_single. > > Not sure of all the underlying code and I'm short on time right now, > but I might give it a try later. > > > Best Regards, > Jim B. ok, I understand better what you want now, but it is not possible (for now) using phpESP ... What you can do is use a seperation text for a question, and then ask for each subpart a question, using html indention: Q: Please check your favorite item in each category: q: which flowers: [ ] Red Roses [ ] Blue Violets [ ] White Carnations q: which fruit: [ ] Red Strawberries [ ] Blue Berries [ ] White Grapes q: which footware: [ ] Red Sandals [ ] Blue Slippers [ ] White Flipflops I must say that you try to ask one question for several categories, and phpESP just isn't designed for that ... Franky |