The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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,

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


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,

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.


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).

Smile

- 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.

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).

Smile

- 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


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.

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).

Smile

- 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!