Greetings, I'm kind of stuck on two related questions. I have a display table, of extracted data from one of my databases. I need my user to be able to select an item from that table with something like a radio button, so I can access just that item for deletion later on. The two problems: I can't for the life of me get a radio button from a form input to line up correctly with the table, my nesting tables in tables just isn't coming out correctly. The second problem is how to bind all of the info from each table row onto that row's radio button. Here's my display table for more clarity: <table border> <tr> <th>Last Name</th> <th>First Name</th> <th>D.O.B</th> <th>Date Dispensed</th> <th>Number</th> <th>Pt.Ed.</th> <th>User ID</th> </tr> <dtml-in "show_lot(REQUEST)"> <tr> <td><dtml-var l_name></td> <td><dtml-var f_name></td> <td><dtml-var "_.DateTime(dob)"></td> <td><dtml-var "_.DateTime(date_disp)"></td> <td><dtml-var num_disp></td> <td><dtml-var pted></td> <td><dtml-var user_id></td> </tr> </dtml-in> </table> Due to the nature of the database, I need all fields to be able to ensure a unique querry. I imagine I'll need to make a list of lists, but I don't know how to bind members of that list to the form's radio buttons once I get there. Ya'll have been great over the few weeks I've been using zope. Any and all help will be appreciated. Thanks for your time and effort, Gary.
+-------[ Gary Lowder ]---------------------- | Greetings, | Due to the nature of the database, I need all fields to be able to | ensure a unique querry. Wrap each tuple in a form and include a submit button to your delete method. Then they can press only one button (works the same as a radio button). I'd fix your database design to have unique ids for each entry, that don't require the entire row. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
I'm sorry, I don't follow the suggestion to wrap each tuple in a form. I'm using gadfly for my db, mostly for ease of deployment at several offices. Does gadfly have a unique id method, like an auto-increment field in MySQL? Thanks, Gary. Andrew Kenneth Milton wrote:
+-------[ Gary Lowder ]---------------------- | Greetings,
| Due to the nature of the database, I need all fields to be able to | ensure a unique querry.
Wrap each tuple in a form and include a submit button to your delete method. Then they can press only one button (works the same as a radio button).
I'd fix your database design to have unique ids for each entry, that don't require the entire row.
+-------[ Gary Lowder ]---------------------- | I'm sorry, I don't follow the suggestion to wrap each tuple in a form. <dtml-in something> <form action="deleteItem" method="POST"> <input type="hidden" name="name" value="&dtml-name;"> ... <tr><td><dtml-var name></td><td><dtml-var someotherfield></td>etc..<td><input type="submit" value=" Delete Me "></td></tr> </dtml-in> | I'm using gadfly for my db, mostly for ease of deployment at several | offices. Does gadfly have a unique id method, like an auto-increment | field in MySQL? I don't if it does, but, that doesn't prevent you from keeping a serial in another table and incrementing it yourself if it doesn't. Even with mSQL you could get the _rowid of each row, there has to be something that makes each row unique. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
participants (2)
-
Andrew Kenneth Milton -
Gary Lowder