You are not logged in.
Pages: 1
I'm interested in created a module that has a couple of levels. Each month, we release a newspaper here on campus at my college. We have a section called Word on Campus, where we ask the students a question, and their response is printed in the paper. I would also like to put these responses, along with their photo, name, major in the website. Using the module as I understand them, I can create fields for their responses, i.e. Name, Photo, Major, Response. But, how would I group these responses based on the question though? Where would I enter the question that these responses are based on? i.e.
Question: What will you remember most about your academic career, and what are your post-graduation plans?
|
| Field - Response: The great part of getting my degree through...
| Field - Name: Jane Doe
| Field - Major: Bachelor of Science
| Field - Photo: Upload photo
Where I usually have 8 responders per question each month.
Thanks!
Offline
Will you be soliciting the responses from the website or manually entering them in the admin?
Offline
Manually entering
Offline
What I would usually do is create two tables for the data:
- Questions
- Responses
Then you'd use an INT(11) column in the responses table to reference the id column in the questions table. You can use the "List" field type and set it to Database Populated to pull a dropdown of questions to reference when building out your form in BigTree.
You can also use the "Grouped List" view type and group on the question column in the responses table if you'd like your view to nicely separate out the responses.
Offline
Yeah, I actually ended up doing something similar to that. I just added a questions table, and linked it to the responses form with a database populated list field. It doesn't exactly group everything together the way I envisioned, but it seems to be working ok as long as I select the appropriate question in the list on each response. I also added a form to manage the questions. One thing I did notice is that when I add a new action to the module to edit the questions, the edit button ("pencil" icon) route always defaults back to the standard /edit route, even though the action is designated as "/edit-question". I noticed that this behavior is even present in the events module that you shared with me, so I think there may be a bug there. In the events module, if you choose view categories, and click on the pencil icon to edit the category, you get the message, "The item you are trying to edit no longer exists.", because it's not pointing to the route in the edit category action of "/edit-category". Instead it's defaulting to the "/edit" route.
I did play around with the grouped list option, but it seems like the two tables would have to be tied together with some sort of id column, which I didn't have available. It'd be nice just to be able to drag the responses into the appropriate question group, but the way it's currently set up should work ok. We only update these questions once a month anyway.
Offline
You can fix the "edit" issue by editing your View and choosing the related form. It will then route to the proper edit.
Offline
Perfect, thanks.
Offline
Pages: 1