Feb 4th, 2013, 10:55 AM
Hello, as the title said, I'm a newbie to Form Tools (great tool by the way and I'm very glad I found it).
I'm trying to set up a form with API using the tool. I have created a registration page and made the necessary amendments to the code . I've also created a "success" page and again made the necessary amendments. I've published both files. Now the problem, I can't seem to send any information - the Add Form routine in Form Tools consistently assures me that it hasn't received any test page submission.
When I hit the "submit" button on my form, the content fields emty, in other words the form clears itself but it does not redirect to the success page.
I've looked carefully at the code and can't find any error in the form page. Would some kind soul please have a look and let me what mistakes I've made?
Man y thanks in advance for any help!
Here's my code for the registration page:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page(3, "initialize");
$params = array(
"submit_button" => "submit",
"next_page" => "success.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Register</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
<style type="text/css">
#wb_Form1
{
background-color: #FAFAFA;
border: 0px #000000 solid;
}
#Editbox1
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox2
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox3
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox4
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox5
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#wb_Text2
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text2 div
{
text-align: left;
}
#wb_Text3
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text3 div
{
text-align: left;
}
#wb_Text4
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text4 div
{
text-align: left;
}
#wb_Text5
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text5 div
{
text-align: left;
}
</style>
<script type="text/javascript">
<!--
function Validateform1(theForm)
{
var regexp;
if (theForm.Editbox1.value == "")
{
alert("Please enter a value for the \"Editbox1\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length < 1)
{
alert("Please enter at least 1 characters in the \"Editbox1\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox2.value == "")
{
alert("Please enter a value for the \"Editbox2\" field.");
theForm.Editbox2.focus();
return false;
}
if (theForm.Editbox2.value.length < 1)
{
alert("Please enter at least 1 characters in the \"Editbox2\" field.");
theForm.Editbox2.focus();
return false;
}
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.Editbox3.value.length != 0 && !regexp.test(theForm.Editbox3.value))
{
alert("Please enter a valid email address.");
theForm.Editbox3.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:258px;top:301px;width:735px;height:375px;z-index:11;">
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"]?>" enctype="text/plain" id="Form1" onsubmit="return Validateform1(this)">
<input type="text" id="Editbox1" style="position:absolute;left:358px;top:47px;width:338px;height:33px;line-height:33px;z-index:0;" name="Editbox1" value="">
<input type="text" id="Editbox2" style="position:absolute;left:358px;top:101px;width:338px;height:33px;line-height:33px;z-index:1;" name="Editbox2" value="">
<input type="email" id="Editbox3" style="position:absolute;left:358px;top:152px;width:338px;height:33px;line-height:33px;z-index:2;" name="Editbox3" value="">
<input type="text" id="Editbox4" style="position:absolute;left:358px;top:206px;width:338px;height:33px;line-height:33px;z-index:3;" name="Editbox4" value="">
<input type="password" id="Editbox5" style="position:absolute;left:358px;top:258px;width:338px;height:33px;line-height:33px;z-index:4;" name="Editbox5" value="">
<div id="wb_Text1" style="position:absolute;left:50px;top:54px;width:274px;height:18px;z-index:5;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> First Name</span></div>
<div id="wb_Text2" style="position:absolute;left:50px;top:111px;width:274px;height:18px;z-index:6;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> Last Name</span></div>
<div id="wb_Text3" style="position:absolute;left:50px;top:164px;width:274px;height:18px;z-index:7;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;">email address</span></div>
<div id="wb_Text4" style="position:absolute;left:49px;top:219px;width:274px;height:18px;z-index:8;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> username</span></div>
<div id="wb_Text5" style="position:absolute;left:50px;top:269px;width:274px;height:18px;z-index:9;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> password</span></div>
<button id="AdvancedButton1" type="submit" name="" value="" style="position:absolute;left:240px;top:307px;width:298px;height:54px;z-index:10;"><div style="text-align:center"><span style="color:#000000;font-family:Verdana;font-size:16px"> submit</span></div></button>
</form>
</div>
</div>
</body>
</html>
I'm trying to set up a form with API using the tool. I have created a registration page and made the necessary amendments to the code . I've also created a "success" page and again made the necessary amendments. I've published both files. Now the problem, I can't seem to send any information - the Add Form routine in Form Tools consistently assures me that it hasn't received any test page submission.
When I hit the "submit" button on my form, the content fields emty, in other words the form clears itself but it does not redirect to the success page.
I've looked carefully at the code and can't find any error in the form page. Would some kind soul please have a look and let me what mistakes I've made?
Man y thanks in advance for any help!
Here's my code for the registration page:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page(3, "initialize");
$params = array(
"submit_button" => "submit",
"next_page" => "success.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Register</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
<style type="text/css">
#wb_Form1
{
background-color: #FAFAFA;
border: 0px #000000 solid;
}
#Editbox1
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox2
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox3
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox4
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Editbox5
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#wb_Text2
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text2 div
{
text-align: left;
}
#wb_Text3
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text3 div
{
text-align: left;
}
#wb_Text4
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text4 div
{
text-align: left;
}
#wb_Text5
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text5 div
{
text-align: left;
}
</style>
<script type="text/javascript">
<!--
function Validateform1(theForm)
{
var regexp;
if (theForm.Editbox1.value == "")
{
alert("Please enter a value for the \"Editbox1\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length < 1)
{
alert("Please enter at least 1 characters in the \"Editbox1\" field.");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox2.value == "")
{
alert("Please enter a value for the \"Editbox2\" field.");
theForm.Editbox2.focus();
return false;
}
if (theForm.Editbox2.value.length < 1)
{
alert("Please enter at least 1 characters in the \"Editbox2\" field.");
theForm.Editbox2.focus();
return false;
}
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.Editbox3.value.length != 0 && !regexp.test(theForm.Editbox3.value))
{
alert("Please enter a valid email address.");
theForm.Editbox3.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:258px;top:301px;width:735px;height:375px;z-index:11;">
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"]?>" enctype="text/plain" id="Form1" onsubmit="return Validateform1(this)">
<input type="text" id="Editbox1" style="position:absolute;left:358px;top:47px;width:338px;height:33px;line-height:33px;z-index:0;" name="Editbox1" value="">
<input type="text" id="Editbox2" style="position:absolute;left:358px;top:101px;width:338px;height:33px;line-height:33px;z-index:1;" name="Editbox2" value="">
<input type="email" id="Editbox3" style="position:absolute;left:358px;top:152px;width:338px;height:33px;line-height:33px;z-index:2;" name="Editbox3" value="">
<input type="text" id="Editbox4" style="position:absolute;left:358px;top:206px;width:338px;height:33px;line-height:33px;z-index:3;" name="Editbox4" value="">
<input type="password" id="Editbox5" style="position:absolute;left:358px;top:258px;width:338px;height:33px;line-height:33px;z-index:4;" name="Editbox5" value="">
<div id="wb_Text1" style="position:absolute;left:50px;top:54px;width:274px;height:18px;z-index:5;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> First Name</span></div>
<div id="wb_Text2" style="position:absolute;left:50px;top:111px;width:274px;height:18px;z-index:6;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> Last Name</span></div>
<div id="wb_Text3" style="position:absolute;left:50px;top:164px;width:274px;height:18px;z-index:7;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;">email address</span></div>
<div id="wb_Text4" style="position:absolute;left:49px;top:219px;width:274px;height:18px;z-index:8;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> username</span></div>
<div id="wb_Text5" style="position:absolute;left:50px;top:269px;width:274px;height:18px;z-index:9;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> password</span></div>
<button id="AdvancedButton1" type="submit" name="" value="" style="position:absolute;left:240px;top:307px;width:298px;height:54px;z-index:10;"><div style="text-align:center"><span style="color:#000000;font-family:Verdana;font-size:16px"> submit</span></div></button>
</form>
</div>
</div>
</body>
</html>