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
/printthread.php 16 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
/printthread.php 16 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
/printthread.php 16 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
/printthread.php 16 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
/printthread.php 16 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
/printthread.php 16 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
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
no_sessions_url problem and $fields access - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: no_sessions_url problem and $fields access (/showthread.php?tid=548)



no_sessions_url problem and $fields access - lorihan - Mar 3rd, 2010

Hi,

I'm new to Form Tools and am so far liking it. However, I'm having a couple of issues.

1. no_sessions_url doesn't want to work for me. I clear out the session and reload the page and it stays on the same page in the multipart form (e.g. form3.php when it should go back to form1.php).

2. For some reason I can't get a value from the $fields array. When I added print_r($fields); I get:
Code:
Array ( [form_tools_form_id] => test [form_tools_submission_id] => test )

Here's my setup for the second form:
Code:
$fields = ft_api_init_form_page();

$params = array(
  "submit_button" => "submit2",
  "next_page" => "form3.php",
  "form_data" => $_POST,
  "no_sessions_url" => "form1.php"
    );
ft_api_process_form($params);
print_r($fields);

echo @$fields["sqft"];

The variable "sqft" is from the first field but doesn't show anything.

Thanks in advanced for any guidance.


RE: no_sessions_url problem and $fields access - lorihan - Mar 4th, 2010

Ah ha! I figured out both issues.

BTW - This was for a WordPress site containing a multiple form process. I used separate page templates for each form as I couldn't use the typical plugins, coding forms in manually.

What solved both problems?

My original code for a form was this:
Code:
<form action="form4.php" method="POST">

The traditional method documented in the tutorials wasn't working for me. I ended up trying this:

Code:
<form action="" method="POST"">

Both issues solved. The page now redirects as it should and I now have access to the $fields array information. Or I should say that the $fields array is now populating like it should.


RE: no_sessions_url problem and $fields access - Ben - Mar 7th, 2010

Excellent, glad it got sorted out and thanks for posting the fix!

- Ben