The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Help! get info from database and a delete... - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Help! get info from database and a delete... (/showthread.php?tid=848) |
Help! get info from database and a delete... - zleyphox - Sep 16th, 2010 Hi! I've started a projekt, but I feel like I need help to know how to continue. First, here's what I want to do: A web page that looks like this: ------- First street Street.........No.....No of papers..Extra text field Firststreet...35A....5..................Extra text...........[Checkbox/link to delete row] Fisrtstreet...103....10.................---....................[Checkbox/link to delete row] [textfield to enter a street] [textfield to enter No] [Textfield to enter No of papers] [Textfield to enter Etra text field] [Save button] Secondstreet Street.............No.....No of papers..Extra text field Secondstreet...35A....5..................Extra text...........[Checkbox/link to delete row] Secondstreet...103....10.................---....................[Checkbox/link to delete row] [textfield to enter a street] [textfield to enter No] [Textfield to enter No of papers] [Textfield to enter Etra text field] [Save button] And so on... -------------------- First you have a headline that tells you witch street you're on. Second, the data stored in the form tools database will print its info for that street. After each street there's a checkbox, link or something like that, witch will delete the row from the database. Third, there's a input row to add new rows to the database. (I haven't thought it through to have a text field for the street). After that it starts all over with a new street. The problem I have is that I don't really now how to get the form tool to print the info that way, as you don't know in advance how many rows it's gonna' be. Also I think the ID's will be larger and larger even if you delete rows. Second, how will I get the delete-link to work? Thanx 4 ure reply! RE: Help! get info from database and a delete... - Ben - Sep 19th, 2010 Hi xleyphox, Thanks for the post - neat problem! So do you want to display that info to Form Tools users after they log in, or right on your site? If it's on your site, you'll want to look into the ft_api_show_submissions() API function. As an example (which includes the PHP), see the demo: http://demo.formtools.org/ Click on the ft_api_show_submissions in the left navigation panel. The documentation page also contains more info on it: http://docs.formtools.org/api/?page=ft_api_show_submissions Basically, the markup is generated through the Export Manager module - which comes bundled with the standard Form Tools installations. You can customize that to create your own export formats in any way you want. Hope this helps a little. - Ben |