NAME:* " TYPE="text"> PHONE: * " TYPE="text"> E-MAIL: * " TYPE="text"> I'd like to receive more information on the following services: SERVICES: Drop down box (hold control to select more than one): > Project Management Risk Management Consulting Organizational Consulting Training Speaking Engagements Team Building Exercises Individual Consulting Sessions PMP Test Prep Defense & Government Support Please enter any details you think we should know about, if you are interested in a service not listed above: --> Post edited by: kade119, at: 2007/12/27 17:54Post edited by: kade119, at: 2007/12/27 18:01"> contact form w/ send files to db on server and ema - Forums

Forums

contact form w/ send files to db on server and ema

kade119 27 Dec, 2007
hi all.. i had created a contact form for just a basic html/css site using php.. it uploaded files to a database on a server and also e-mailed the files to the recipient my question is how can i use this in combination w/ the chronoform... or do you guys have a demo form that does something similar i may view?
btw im using joomla now.. and want to use the following form with it..
thanks



<?php
$project=$_GET['project'];

$err=$_GET['err'];
?>
<style type="text/css">
.cform{

	margin:30px 0px 0px 0px;

	padding:0px 0px 0px 60px;

	display:block;

	width:250;


}



.cform p{

	font-size: 10px;

	font-family: Arial, Helvetica, sans-serif; 

	margin:0px 0px 6px 0px;

	line-height: 12px;

	color:#fff;

}



.cform input{

	height:16px;

	color:#fff;
	
	width:250px;

	font-family:Arial, Helvetica, sans-serif;

	font-size:11px;

	margin:0px auto;

	background:#0D1722;

	border:1px solid #007FFF;

}



.cform input.submit{

	font-size:9px;

	font-weight:bold;

	color:#8a827a;

	height:20px;

	width:60px;

	text-align:center;

	padding:0px;

	margin:0px auto;

	cursor:«»pointer;

	background-color:#151413;

	border-top:1px solid #BBBDBF;

	border-left:1px solid #707070;

	border-right:1px solid #2B2B2B;

	border-bottom:1px solid #2B2B2B;
}



.cform input:hover.submit{

	color:#fff;
	background:#505050;
	height:20px;
	width:60px;
}

.cmsg{
	font-size:11px;
	font-family:Arial, Helvetica, sans-serif;
	color:#fff;
	width:250px;
	height:80px;
	margin:6px 0px 0px 0px;
	background:#0D1722;
	border:1px solid #007FFF;

}





select

{	
	font-size:11px;
	
	font-family:Arial, Helvetica, sans-serif;
	
	color:#fff;
	
	width: 250px;

	border:1px solid #007FFF;
	
	background:#0D1722;

}

</style>
 


<div class="cform">
<?php
if($err){
echo "<div style='font-family:arial; color:#fff;'>$err</div>";
if($project === "project"«»){$ch1="checked";}

}
?>
            <form action="gdform.php" method="post">
              <table cellspacing="0" cellpadding="0" style="margin-bottom: -10px;">
                <tr>
                  <td><p>NAME:<span class="loud">*</span> <br />
                      <INPUT NAME="name" value="<?=$name?>" TYPE="text">
                    </p></td>
                </tr>
				 <tr>
                  <td><!--  -->
                    <p>PHONE:<span class="loud"> *</span><br />
                      <INPUT NAME="phone" value="<?=$phone?>" TYPE="text">
                    </p></td>
                </tr>
                <tr>
                  <td><!--  -->
                    <p>E-MAIL:<span class="loud"> *</span><br />
                      <INPUT NAME="email" value="<?=$email?>" TYPE="text">
                    </p></td>
                </tr>
                <tr>
                  <td><!--  -->
				  <p>I'd like to receive more information on the following services:</p>
                    <p>SERVICES:<br />
					<i><p>Drop down box (hold control to select more than one):</p></i>
					<select multiple size="4"  name="project"  value="project" <?=$ch1?>>
						  <option value ="Project Management">Project Management</option>
						  <option value ="Risk Management Consulting">Risk Management Consulting</option>
						  <option value ="Organizational Consulting">Organizational Consulting</option>
						  <option value ="Training">Training</option>
						  <option value ="Speaking Engagements">Speaking Engagements</option>
						  <option value ="Team Building Exercises">Team Building Exercises</option>
						  <option value ="Individual Consulting Sessions">Individual Consulting Sessions</option>
						  <option value ="PMP Test Prep">PMP Test Prep</option>
						  <option value ="Defense & Government Support">Defense & Government Support</option>
						</select>
					 </p>  
                  </td>
                </tr>
               
                <tr>
                  <td><p>Please enter any details you think we should know about,<br /> if you are interested in a service not listed above:<br />
                      <textarea name="comments" class="cmsg" wrap="on"><?=$comments?></textarea>
                      <!--<br /> -->
                    </p></td>
                </tr>
                <tr>
                  <td><p style="margin-top: -3px;">
                      <INPUT TYPE="submit" CLASS="submit" VALUE=" Send ">
                      <!--    -->
                      <INPUT TYPE="reset"CLASS="submit" VALUE=" Clear  ">
                  </td>
                </tr>
                <tr>
                  <td><INPUT TYPE="hidden" NAME="redirect" VALUE="thanks.php">
                    </p>
                  </td>
                </tr>
              </table>
            </FORM>
          </div>
  


Post edited by: kade119, at: 2007/12/27 17:54<br><br>Post edited by: kade119, at: 2007/12/27 18:01
GreyHead 30 Dec, 2007
Hi kade119,

This should work OK with ChronoForms.

Install ChronoForms, download and restore the test from from the download area here. Change the email addresses etc. in that so that it works for you.

When you have it working, copy the from in the ChronoForms Form Manager, then replace the Form HTML with your HTML - **without the <form> tags** It may help to add a few fields at a time and debug them as you go but the code looks good.

Bob
This topic is locked and no more replies can be posted.