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



Form Tools
Pre-Parser not working with PHP Fields - 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: Pre-Parser not working with PHP Fields (/showthread.php?tid=543)



Pre-Parser not working with PHP Fields - Johhhn - Mar 1st, 2010

Hi,

I have a multi-form setup that works 100%. Receives submissions, emails, etc..

However, the pre-parser doesn't seem to work,, more specifically, I'm trying to combine 3 fields for phone.

I'm using your code that you demonstrated a couple of times and it doesn't work at all. Here's my code with the fields I have in the database.
PHP Code:
if ( (isset($_POST["CamperPhone1"]) && !empty($_POST["CamperPhone1"])) && 
     (isset($_POST["CamperPhone2"]) && !empty($_POST["CamperPhone2"])) && 
     (isset($_POST["CamperPhone3"]) && !empty($_POST["CamperPhone31"])) )
{
  $_POST["CamperPhone"] = "{$_POST["CamperPhone1"]}-{$_POST["CamperPhone2"]}-{$_POST["CamperPhone3"]}";

Interestingly enough, if I simply type $_POST[CamperPhone"]="test"; it works just fine,, that field will receive "test" once the submission for the 6 page form is done. However, if I try $_POST[CamperPhone"]=$_POST["CamperPhone1"]; for example, it doesn't work.. I also tried print_r($_POST);exit; to debug the field CamperPhone but it never receives anything from any another variable.

Any ideas?

thanks!

John
OK, I just figured it out.. apparently, the pre-parser will only work with lowercase fields!

Can someone verify this for me? I've seen it on 2 different installs.. thanks!


RE: Pre-Parser not working with PHP Fields - Ben - Mar 14th, 2010

Really...? It should be case-sensitive...

Though now that I think about it, it makes me worried: I always use lowercase on my own installations... uh-oh. I don't have time to look at it right now, but I'll log it as a bug and check it out when I can.
http://forums.formtools.org/showthread.php?tid=543

Thanks!

- Ben