hi am tryint to add a new form and having some problems and badly need some help. Down is the code of the form its not passing the line 2 when am trying. for now the form is on localhost and i need to put it on the my website on this page http://droitetvie.org/4.html.
expecting soon for a reply
<?php
require_once("http://127.0.0.1:8888/droitetvie/benevole.php");
$fields = ft_api_init_form_page("", "test");
$params = array(
"submit_button" => "submit_button_name_attribute",
"next_page" => "thanks.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Livre d'or 2" href="acceuil.css" />
<title>Droit et Vie - Formulaire Benevole</title>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<form action="http://benevole.droitetvie.org/process.php" method="post">
<input type="hidden" name="form_tools_initialize_form" value="1" />
<input type="hidden" name="form_tools_form_id" value="2" />
<p>Tous les champs avec une etoile sont requis</p>
<TABLE WIDTH="198" CELLPADDING="3" CELLSPACING="0" BORDER="0" STYLE="background-color: #EEEEEE; border: 1px solid #878787">
<TR>
<TD ><B> Cordonées</B></TD>
</TR>
<TR>
<TD>
<FORM NAME="info_benevol" >
<TABLE WIDTH="195" CELLPADDING="3" CELLSPACING="1" BORDER="0">
<TR>
<TD ALIGN="RIGHT">Nom*</TD>
<TD><INPUT TYPE="TEXT" NAME="nom" ...></TD>
<TD ALIGN="RIGHT">Prenom*</TD>
<TD>
<input name="prenom" type="text" /></TD>
<TD ALIGN="RIGHT">E-mail*</TD>
<TD>
<input name="mail" type="text" /></TD>
</TD>
<tr>
<td align="right">Nationalité*</td>
<td><input name="nationalite" type="text" /></td>
<td align="right">Pays*</td>
<td><input name="pays" type="text" /></td>
<td align="right">Telephonne</td>
<td><input name="tel" type="text" /></td>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
<br/>
<br/>
<label for="no"><b> Adress </b><br/><br/>
<label for="no">No. : </label>
<input name="no" type="text" size="5" maxlength="255" />
<label for="complement">Complement :
<input name="complement" type="text" size="30" maxlength="60" /></label>
<br/><br/>
<label for="rue">Rue : <input name="rue" type="text" size="50" maxlength="255" /></label>
<br/><br/>
<labe for="ville">Ville : <input name="ville" type="text" size="35" maxlength="255" /></label>
<label for="postal">Code postal : <input name="postal" type="text" size="5" maxlength="7" /> </label>
<br/><br/>
<label for="commentaires"> Commentaires*
<textarea name="Commentaires" cols="96" rows="30">Que pouvez vous nous dire sur vous </textarea></label>
</label>
<input name="envoyer" type="submit" value="Envoyer" />
<input name="reset" type="reset" value="Reset" />
<form name="adress" onsubmit="MM_validateForm('nom','','R','prenom','','R','mail','','RisEmail','nationalite','','R','pays','','R','tel','','NisNum','Commentaires','','R');return document.MM_returnValue">
</form>
</form>
</body>
</html>
expecting soon for a reply
<?php
require_once("http://127.0.0.1:8888/droitetvie/benevole.php");
$fields = ft_api_init_form_page("", "test");
$params = array(
"submit_button" => "submit_button_name_attribute",
"next_page" => "thanks.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Livre d'or 2" href="acceuil.css" />
<title>Droit et Vie - Formulaire Benevole</title>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<form action="http://benevole.droitetvie.org/process.php" method="post">
<input type="hidden" name="form_tools_initialize_form" value="1" />
<input type="hidden" name="form_tools_form_id" value="2" />
<p>Tous les champs avec une etoile sont requis</p>
<TABLE WIDTH="198" CELLPADDING="3" CELLSPACING="0" BORDER="0" STYLE="background-color: #EEEEEE; border: 1px solid #878787">
<TR>
<TD ><B> Cordonées</B></TD>
</TR>
<TR>
<TD>
<FORM NAME="info_benevol" >
<TABLE WIDTH="195" CELLPADDING="3" CELLSPACING="1" BORDER="0">
<TR>
<TD ALIGN="RIGHT">Nom*</TD>
<TD><INPUT TYPE="TEXT" NAME="nom" ...></TD>
<TD ALIGN="RIGHT">Prenom*</TD>
<TD>
<input name="prenom" type="text" /></TD>
<TD ALIGN="RIGHT">E-mail*</TD>
<TD>
<input name="mail" type="text" /></TD>
</TD>
<tr>
<td align="right">Nationalité*</td>
<td><input name="nationalite" type="text" /></td>
<td align="right">Pays*</td>
<td><input name="pays" type="text" /></td>
<td align="right">Telephonne</td>
<td><input name="tel" type="text" /></td>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
<br/>
<br/>
<label for="no"><b> Adress </b><br/><br/>
<label for="no">No. : </label>
<input name="no" type="text" size="5" maxlength="255" />
<label for="complement">Complement :
<input name="complement" type="text" size="30" maxlength="60" /></label>
<br/><br/>
<label for="rue">Rue : <input name="rue" type="text" size="50" maxlength="255" /></label>
<br/><br/>
<labe for="ville">Ville : <input name="ville" type="text" size="35" maxlength="255" /></label>
<label for="postal">Code postal : <input name="postal" type="text" size="5" maxlength="7" /> </label>
<br/><br/>
<label for="commentaires"> Commentaires*
<textarea name="Commentaires" cols="96" rows="30">Que pouvez vous nous dire sur vous </textarea></label>
</label>
<input name="envoyer" type="submit" value="Envoyer" />
<input name="reset" type="reset" value="Reset" />
<form name="adress" onsubmit="MM_validateForm('nom','','R','prenom','','R','mail','','RisEmail','nationalite','','R','pays','','R','tel','','NisNum','Commentaires','','R');return document.MM_returnValue">
</form>
</form>
</body>
</html>