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 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (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.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
I am having trouble with formtools - 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: I am having trouble with formtools (/showthread.php?tid=445)



I am having trouble with formtools - uswgo - Jan 18th, 2010

I actually got everything set up and when I submit the form data it redirects to the next page but when I check validation it acts as if no data has been sent through.

This is the code I use.

Code:
<?php
require_once("/home/uswgo/public_html/formprocessor/global/api/api.php");
$fields = ft_api_init_form_page(3, "initialize");
$params = array(
  "submit_button" => "Submit",
  "next_page" => "thankyou.php",
  "form_data" => $_POST,
  "finalize" => true
    );
ft_api_process_form($params);
?>

<html>
<head>
<style type="text/css">
body {color:white}
h1 {color:red}
p.ex {color:rgb(0,0,255)}
body {background-image:url('hyipoformbackground2.gif')}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<?php
// if $errors is not empty, the form must have failed one or more validation
// tests. Loop through each and display them on the page for the user
if (!empty($errors))
{
echo "<div class='error'>Please fix the following errors:\n<ul>";
foreach ($errors as $error)
echo "<li>$error</li>\n";

echo "</ul></div>";
}
?>

<FORM ACTION="<?php echo $_SERVER["PHP_SELF"]?>" METHOD="POST">
<H1><font color="RED">Author Application Form</FONT></H1>
<BR><BR>
Your Full Name:<input type="text" size="20" maxlength="30" name="2947947299173"><br />
Why do you want to become an Author:<input type="text" size="30" maxlength="40" name="1093843978482"><br />
If you have a WordPress account then tell me your username or else input no:<input type="text" size="20" maxlength="36" name="2839727828829"><br />
Optional unless you don't have an account - Author Account Name:<input type="text" size="20" maxlength="36" name="1839948929923"><br />
Don't worry about inputing a password because a random generated password will be sent to you then yoiu can change to whatever you want
<BR><BR>
<Font color="white">Tell me a bit about who you are :) don't be shy</font>
<BR>
<textarea rows="8" cols="30" name="comments" value="64822783993472" wrap="physical">Enter your favorite quote!</textarea>:<br />
<BR>
<Font color="white">Comments, suggestions, and more may be</font>
<Font color="white">inputed in the box and will not hurt your chances of becoming an author</font>
<BR><BR>Select the category that suits you:<br />
<select name="5893299288321">
<option value="NWO">New World Order</option>
<option value="USNews">U.S. News</option>
<option value="BigBro">Big Brother</option>
<option value="Commentary">Commentary</option>
<option value="WorldNews">World News</option>
<option value="Multimedia">Multimedia</option>
<option value="Current">Current</option>
<option value="Financial">Financial</option>
<option value="General">General Articles</option>
<option value="Technology">Technology</option>
<option value="Science">Science</option>
<option value="News in Focus">New World Order</option>
<option value="Featured">Featured</option>
<option value="MPWatch">Military Police Watch</option>
<option value="FluWatch">Flu Watch</option>
<option value="BetaStateSecede">(Pending beta)State Secession Watch</option>
</select>
<BR><BR>
Are you against the new world order:<input type="text" size="20" maxlength="36" name="9478886789965"><br />
<BR><BR>


<input type="Submit" id="Submit" name="Submit" value="Submit" style="float: center" />
</form>

I know it's a site about the nwo but please despite your political views just concentrate on the issues instead of getting mad and not helping me. I don't really want to have to edit out all my script just to post it here and may end up keeping you all from helping me.

Just wanted to let you know that because I make a lot of enemies cause of my view points and all I want here is help for my formtools issues. Thats all I want from here. I am not looking for trouble Wink


RE: I am having trouble with formtools - Ben - Jan 30th, 2010

Hi uswgo,

Sorry for the wait! I was away for a week and only managed to get back to the forums today.

You mentioned that when you check validation no data appears to go through, but I didn't see any validation in the code you posted. Would you mind posting the whole thing?

A common problem is that after doing server-side validation on the form field contents, the fields don't get re-entered. For that, give these two tutorials a read through:
http://docs.formtools.org/tutorials/php_validation/
http://docs.formtools.org/tutorials/api_refilling_form_fields/

The first one explains how to get server-side validation added to your API form; the second explains how to re-enter the form fields.

Hope this helps, and good luck with the project. Smile

- Ben