Hi guys, I have a question regarding drupal 6 forms.
I have 4 tables: location[locationid, name]; package[packageid, name], person[personid, name, locationid, address, etc...] pickup[pickupid, personid, packageid, locationid, _pickup_day_,...].
I've made forms and form_submit for the three tables: location, package, person (simple CRUD as usual). Now, I want to make a form to submit data into the "pickup" table. The twist is, the only data the user needs to input is the "pickup_day" field, which can be 1 or 0 (monday or tuesday). So I imagine when I go to the pickups url, I'll see a list of output fields:
firstname | lastname | location | pickup day | package type
first1 last1 church1 select box (monday/tuesday) select box (type1/type2/type3)
first2 last2 church1 select box (monday/tuesday) select box (type1/type2/type3)
first3 last3 church1 select box (monday/tuesday) select box (type1/type2/type3)
[submit button]
When its submitted, the data goes into "pickup" table.
I'm trying to figure how to render the select boxes while outputting person's information.
(Just an aside, would it be possible to have a search before seeing the form...for example I search for location to be church1, then I'll see all the users at that location in a form as above)
All help is very much appreciated...even pointing to a module that does something similar to this is fine... I just need to get some hints on how people have approached this. Much thanks!
End goal: So, basically, I have a number of people in my database. Each person is assigned a location where they can go and pickup food. I want to record each pickup for each week for each person. So I have a pickups table to do that. So I'm trying to make a single form (pickups), where I can go to and update who picked up what...on what day (Monday or Tuesday). But so in this form, I need to show all the people registered for a particular location. So lets say a person is registered for a church called Church 1...I want to search for the Church 1 location, then all the people who are registered for that location comes up row by row. Then I can select which day each person picked up food and what type of food they picked up...and click submit. Then I'll run a query against my database to add this information.
The big deal I guess is that instead of making a form for each person (for each row), I just make one form and when the form is submitted everyone will be added to the "pickup" table with the appropriate day and item they picked up.