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 "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
submission pre-parser, what's wrong with this code - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: submission pre-parser, what's wrong with this code (/showthread.php?tid=1824)



submission pre-parser, what's wrong with this code - jadine - Dec 17th, 2011

Hi,

Pretty straight forward, I would've thought, but not working.

Code:
$submission_info = ft_get_submission_info(1, 1);
  
if (($_POST["Status"]=="Active") && ($submission_info["status"]=="Inactive"))
{

  $_POST["Transitions"]= "String";
}


Basically, on a transition from "inactive" to "active" change the text in the "Transition" form field name (it's a text box).

The condition executes, but I have no clue what's wrong with the POST thing. PHP beginner here

Second thing, how do I obtain the current submission ID, rather than using ft_get_submission_info(1, 1), I would like to use something like ft_get_submission_info(1, $Submission_ID)?


RE: submission pre-parser, what's wrong with this code - jadine - Dec 17th, 2011

OK, so doing an echo $_POST["Transitions"]; after the if statement shows that the $_POST value changes, but I still have no clue as to why it's not changing in the form field itself

Any ideas?


RE: submission pre-parser, what's wrong with this code - jadine - Dec 18th, 2011

So I've forsaken working with submission_preparser and added the following code to the hooks manager on the ft_update_submission, start

Code:
global $g_table_prefix;
$form_id = 1;
$submission_info = ft_get_submission_info($form_id, $submission_id);
  
if (($_POST["Status"]=="Active") && ($submission_info["status"]=="Inactive"))
{
  $result =  mysql_query("UPDATE {$g_table_prefix}form_{$form_id} SET transitions = 1 WHERE submission_id = $submission_id");
  echo $result;
}

$result returns 1, and still the database doesn't update when I check from phpmyadmin or from the form tools fontend