The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
getting fields from the database into a form - 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: getting fields from the database into a form (/showthread.php?tid=898) Pages:
1
2
|
RE: getting fields from the database into a form - Ben - Nov 18th, 2010 Heya, Sorry for the wait! No, you're not off track at all - you just need to tweak it a bit. The function you're interested in is this, I think: PHP Code: $submission_info = ft_get_submission_info($form_id, $submission_id); But you'll need both the form ID and submission ID... When you added your link on the edit submission page, could you append the submission ID & form ID to pass them in the query string? - Ben RE: getting fields from the database into a form - Printline - Nov 19th, 2010 (Nov 18th, 2010, 9:45 PM)Ben Wrote: Heya, Hi' Thanks Ben, you're the Man..... It works perfect now. Great! - Printline RE: getting fields from the database into a form - Printline - Nov 29th, 2010 (Nov 19th, 2010, 4:33 AM)Printline Wrote:(Nov 18th, 2010, 9:45 PM)Ben Wrote: Heya, Hi' again I have run into another little problem, that i would very much appreciate if you could give me your opinion on. I can now fetch data by calling the form and submission id. Now instead of submitting the form again, i would like to just update the submission. Do i need another submit button in the form, that behaves like an update button...??? or do i need to add the submission id somewhere (in the form action attribute or somewhere else). P.S. it is a multi page form i have. RE: getting fields from the database into a form - Ben - Dec 4th, 2010 Ah... unfortunately this one won't be so simple. Here's the trouble. The core function ft_update_submission() was... well, rather badly designed. From the name, it *sounds* like it should just update a submission - which is does - but it also does a whole lot of other stuff relevant only within the Form Tools UI, like checking permissions, sending emails, etc. I'm going to be working on an update to the API in the next couple of weeks. I'll include a function to do this for you. If you haven't heard back from me in a little while, send me an email. (ben.keen@gmail.com). ![]() - Ben RE: getting fields from the database into a form - Printline - Dec 6th, 2010 (Dec 4th, 2010, 10:42 AM)Ben Wrote: Ah... unfortunately this one won't be so simple. Hi' Ben Yeah, thought it wouldn't be as easy as it might sound.... I wil try to figure out a way to work around this for now, maybe i will just settle with the fact that it creates a new submission. I will look forward to your update. I will be in touch. - Printline RE: getting fields from the database into a form - Printline - Sep 19th, 2013 (Dec 6th, 2010, 1:57 AM)Printline Wrote:(Dec 4th, 2010, 10:42 AM)Ben Wrote: Ah... unfortunately this one won't be so simple. Hi' there I have a little problem. I have changed webserver and gone from a php version 4 to a php version 5.4. Now, I think this affects some of the php coding from the above threads because i can't fetch the submitted data and pass it into my form anymore. I believe that the below code is what should do the trick, but for some reason it doesn't anymore. PHP Code: $submission_info = ft_get_submission_info($form_id, $submission_id); But this code still works: PHP Code: $account_info = ft_get_account_info($_SESSION["ft"]["account"]["account_id"]); Any idea on what i need to change the php to.....???? Thanks in advance! |