The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Multiple Forms - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16) +--- Thread: Multiple Forms (/showthread.php?tid=148) |
Multiple Forms - walkingby - May 12th, 2009 Ok...bare with me while I try to best explain this... I have a form which contains a dynamically fed list menu, which is queries from another form. Confused yet? ...To better clarify... one form is used to add information, most importantly a persons name to one table in my database. Once added, a list menu will dynamically update on another form which then displays a list of all names. Here's where the question comes in... The form which displays the dynamically fed list menu is a donation page. I'd like the "amount" field stored here, but also pass to my other form. Basically I need the ability to pass that fields information to 2 tables all at once. It seems there would be a fairly basic way of achieving this through the pre-parser module...but I haven't found that yet. How would I go about this task? The "overall" goal is to eventually use a SUM query to display a running total of donations within one form ...but that's phase 2. Thanks Much! Brian RE: Multiple Forms - Ben - May 13th, 2009 Hey Brian, Neat problem! Yes, the pre-parser is certainly the module for it, but it will require a little fiddling to get it going. Normally, form submissions are added either via the process.php file or the API, but in your case neither really fit the job. You'll want to add some code to the pre-parser rule that inserts the record into the second table; once that's done the original form submission is added normally. Bingo! Two form submissions added in two different tables. Speaking in general terms I'd suggest looking into the ft_create_blank_submission() function, which returns a new submission ID. You can then compile a hash of form information and pass it all along to the ft_update_submission() function. If you get stuck, post me back - I know the above comments are very general, so I don't mind looking into it directly if you like. That said, I probably won't have time until the weekend. Anyway, hope all is well! - Ben RE: Multiple Forms - walkingby - May 14th, 2009 Thanks Ben! I'm anxious to give this a shot... I'll post my status shortly whether it be win or lose. Brian RE: Multiple Forms - anderso85 - Nov 25th, 2020 He can talk about assignmenthelp4me reviews as you all cna see and would like to add a bit more facts for all of us at this stage. This will be of a great usage as we were in need of that for the rest of the community in their academic work for the coming years. |