The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/showthread.php 137 forum_permissions
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1952 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1952 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 629 mark_thread_read
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 784 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 784 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.27 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



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
How do I summarize data after entry
#1
After an email is submitted to myself and the user, I would like to redirect the user to a page that displays a summary of everything he/she had just filled out. Is this possible?

I have successfully installed the script on my server and am using the 'direct' submission method (non-api).

I have been looking high and low for a solution. Please help. thanks

John
Reply
#2
Hi John,

Sure! So would you like the email to contain a link to the summary page, or redirect automatically via the form?

But for the page itself, there's a handy API function that lets you do exactly this. It's totally fine to keep your form as a "direct" method, but the summary page will use the API. Give these two links a look over:

1. ft_api_show_submission documentation
http://docs.formtools.org/api/?page=ft_a...submission

2. an example with code:
http://demo.formtools.org/ (click on "ft_api_show_submission").

The trick is to pass the submission ID to the page so that it can be used in the function. This can be just passed via the query string ?submission_id=X.

Also, all of the above is assuming that security isn't a concern. If the information is private and you want to absolutely forbid hackers from viewing the information, we'll need to follow a slightly more stringent approach.

Sorry for the rather high-level help - let me know if you get stumped on anything & I'll try to lend a hand.

- Ben
Reply
#3
Ben,

Thanks a lot for your time and help! I am very happy to hear that what I want to do is possible.

I reviewed what you suggested and the matter seems a bit clearer. However, let me know if I have this straight. I have two pages. 1) my index.php where the form is filled out and 2) my success.php page.

First I should change the link in the submit button from formtools/process.php to formtools/process.php?submission_id=X ?

Second, I put <?php require("../formtools/global/code/api/api.php"); ft_api_show_submission(2, 2, 3, 14); ?> on the success page? As far as the #14 goes, is it left blank because each submission is a different ID? (not sure what to do here)

Third any of the fields that I want to appear on the success page I should write '{$ANSWER_email} ' and they will appear?

Finally, when I put the <?php require("../formtools/global/code/api/api.php"); ft_api_show_submission(2, 2, 3, 14); ?> on my success page, the page is blank from where I entered it on the page. What am I doing wrong?

I am not so concerned about the security, it's just email and regular addresses. However, if ordinary people visiting the site can see other peoples information easily I would be concerned.

Thank you in advance for help!

John
Reply
#4
Hey John,

Excellent! Sounds like you're making progress.

Quote:First I should change the link in the submit button from formtools/process.php to formtools/process.php?submission_id=X ?

Actually, not quite: Form Tools has the option for direct forms to redirect with whatever submission info you want to be passed via the query string. To set this up, in the Form Tools admin section go to the Edit Form -> Fields tab. There, the penultimate column is labeled "pass on" and has a bunch of checkboxes. Just check the field for "Submission ID". Now, Form Tools will automatically append ?submission_id=X when redirecting to your thankyou page. So far so good.

Quote:Second, I put <?php require("../formtools/global/code/api/api.php"); ft_api_show_submission(2, 2, 3, 14); ?> on the success page? As far as the #14 goes, is it left blank because each submission is a different ID? (not sure what to do here)

Now we know we have the unique submission ID available in the query string, we can just pull it out with PHP. The first three parameters can just be hardcoded like you're doing now, but the submission ID needs to be dynamic. Try this code:

PHP Code:
if (isset($_GET["submission_id"]) && is_numeric($_GET["submission_id"])) {
  
$submission_id $_GET["submission_id"];
  
ft_api_show_submission(223$submission_id);


And be sure to include your API at the top of the page somewhere.

Quote:Third any of the fields that I want to appear on the success page I should write '{$ANSWER_email} ' and they will appear?

Basically, yes. This bit may be a bit hard to explain because it's SO versatile, but here's the gist of it: the content that's generated in your page is determined by two components:
(1) The View you've chosen (determined by the View ID you've passed the function)
(2) The Export Manager module's export type.

The View lets you choose which fields appear and the export type determines the actual markup for displaying the content. So for example, if you wanted Field 1, 2, 4 and 7 to show up on the page, you'd first create a new View for your form that shows that information. Then, you'd either pass the export ID of an existing Export Manager export type. "Export types" are just chunks of markup with placeholders in them that are used to generate the final markup (HTML, XML, CSV or whatever else).

Boy, this sounds confusing when I type it out, but it makes sense once you fiddle with it a bit. It's separated like this because it lets you present your form information in virtually any way you need - but this complexity does lead to confusion, I'll admit.

Quote:Finally, when I put the <?php require("../formtools/global/code/api/api.php"); ft_api_show_submission(2, 2, 3, 14); ?> on my success page, the page is blank from where I entered it on the page. What am I doing wrong?

This sounds like a path problem. Check that the path you entered to the api.php file is correct. PHP require()'s function stops everything if it can't include the file specified.

Hope this info helps a bit...! Let me know if I wasn't clear on anything.

- Ben
Reply
#5
Ben,

Thanks a lot again for your quick reply!

I changed my success page's php to
Code:
<?php
require("../formtools/global/api/api.php");
if (isset($_GET["submission_id"]) && is_numeric($_GET["submission_id"])) {
  $submission_id = $_GET["submission_id"];
  ft_api_show_submission(2, 2, 3, $submission_id);
}
?>
like you suggested. I hope I wrote it correctly.

The success page seems to be working better than before, however none of the fields come up when I type {$ANSWER_email} on the page.

The view I've chosen is the default one, ID 2, 'All submissions'.

As for the export type, I chose the HTML / Printer-friendly -> 3,one submission per page. I am not sure what the difference is regarding the 3 choices and which would be most appropriate for what I want.

All I want to do is create an html table and input {$ANSWER_email}, {$ANSWER_name} etc.

Sorry for my lack of understanding. Again thanks for your help!

John
Reply
#6
Heya,

Hmm... that looks okay, actually! The export type you picked should be fine.

So nothing gets outputted by that function at all? No errors & no markup?

- Ben
Reply
#7
Ben,

There are no errors or markup at all. On my submit button I have entered
Code:
<input type="hidden" name="form_tools_form_id" value="2" />

The data entered in my form posts to the database fine.

The only problem is that nothing comes up when I write {$answer_email} on the thank you page.

In my fields I have Display text= Email, Form field= email, fieldtype = textbox, pass on= checked.

In view fields I have column & sortable = checked, editable = not checked, searchable = checked, display text = email, tab = data

Modules = changed nothing

Also it does say in the address bar on the thank you page-

Code:
mysite.com/reservation.php?item_name=Full Page %24360&os0=Congrats&os1=Test&os3=2&os4=joe&os5=larry&os6=&os7=&os8=&os9=&os10=&os11=&mrg1=Mr. %26 Mrs.&first_name=john&last_name=doe&address1=555 main st.&address2=&city=new york&country=US&state=NY&zip=10001&night_phone_a=212&night_phone_b=555&night_phone_c=5555&email=john%40doe.com&tot=%24360.00

What do you suggest?

John
Reply
#8
If this is just for viewing records by the week, then all you need is a relationship. It can even be a self-join relationship (there's no point in having a table of just dates). Use a global field to select an arbitrary date, have two calculation fields to determine the week's starting and ending date, and define the relationship to include only records in that week.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)