FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Submission History Module
#1
So I think the Submission History module is pretty darn useful (and cool).

I do have a question though..

Where is that data stored? I was thinking about pulling the "Last Modified by" name out and printing it on a page. For example, I am going to be using formtools for employees to post press releases on our website, and the php page I created pulls the data out from each submission and prints it on the page.. but it would be nice to put a "Last Updated by: John Doe" at the bottom.

Is this do-able? I guess I just need to know where the data is stored.

-Alex
Reply
#2
Hi Alex,

Sorry for not getting back to you!

The Submission History table works by making and maintaining a copy of your submissions form, with a few extra fields in it. If your form ID was 5 (and your DB prefix ft_), your main submission table would be called ft_form_5 and the history table would be ft_form_5_history.

Unlike the main submissions table, the history tables logs multiple records for each submission. Each record logs a particular change to a submission. So that's where your history data is stashed.

If I were you, I'd take a look at the module's functions and see if there's anything in there you can re-use. This function in the /modules/submission_history/global/code/code.php file looks especially promising!

Code:
$info = sh_get_last_submission_history_row($form_id, $submission_id);

- Ben
Reply
#3
Thanks Ben! Once I get all my other bugs worked out, I'll see what I can do with this!

Thanks,
Alex
Reply
#4
Hello Ben,

for me the Submission History Module is unfortunately not working in a freshly installed 2.1.0-beta-20110730.
The tables exist in the database but whenever I start the module I get the message:
Code:
Notice: Undefined index: sh___history_id in C:\apache\htdocs\formtools\modules\submission_history\global\code\code.php on line 725
When clicking "Create History Tables" there is no reaction.

When viewing a submission I can see the blue history box which is showing:
Code:
There is no history logged for this submission.

Hope you have a solution for this.

Have a nice sunday.
Hannes
Reply
#5
Huh! Good to know, I'll check it out!

Thanks, Hannes! Smile

- Ben
Reply
#6
Hi Hannes,

Mind trying upgrading to the latest version of the module (1.1.1)?

Should be fixed now.

- Ben
Reply
#7
Thumbs Up 
(Jul 31st, 2011, 1:37 PM)Ben Wrote: Hi Hannes,

Mind trying upgrading to the latest version of the module (1.1.1)?

Should be fixed now.

- Ben

Yep, it's fixed and working perfectly now. Thanks a lot for the fast upgrade.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)