Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Nov 18th, 2010, 9:45 PM
(This post was last modified: Nov 18th, 2010, 9:45 PM by Ben.)
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
Posts: 17
Threads: 6
Joined: Oct 2010
Reputation:
0
(Nov 18th, 2010, 9:45 PM)Ben Wrote: 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
Hi'
Thanks Ben, you're the Man..... It works perfect now. Great!
- Printline
Posts: 17
Threads: 6
Joined: Oct 2010
Reputation:
0
(Nov 19th, 2010, 4:33 AM)Printline Wrote: (Nov 18th, 2010, 9:45 PM)Ben Wrote: 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
Hi'
Thanks Ben, you're the Man..... It works perfect now. Great!
- Printline
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.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
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
Posts: 17
Threads: 6
Joined: Oct 2010
Reputation:
0
Dec 6th, 2010, 1:57 AM
(This post was last modified: Dec 6th, 2010, 1:58 AM by Printline.)
(Dec 4th, 2010, 10:42 AM)Ben Wrote: 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
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
Posts: 17
Threads: 6
Joined: Oct 2010
Reputation:
0
(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.
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
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
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!
|