, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > FAQ's: Contact Form > CONTACT FORM: I've accidentally deleted my contact and/or contact-submit page!

FlexCMS Support Forum


CONTACT FORM: I've accidentally deleted my contact and/or contact-submit page!
Started June 11, 2004 @ 2:58pm by otter
(This thread is currently Locked) 
otter
Administrator



Posts: 177
 
CONTACT FORM: I've accidentally deleted my contact and/or contact-submit page!June 11, 2004 @ 2:58pm
This is no longer the current contact form in distribution with FlexCMS 2.5 and later. If you're looking for that code, please go here: http://www.flexcms.com/index.php/forum/thread/251.html. The code below should only be used if you need to replace the contact form on an older version site.


Updated for FlexCMS v1.3.1, September 12, 2005 release. If you're not currently running this version or later, please update before applying the code below to your site.

If you thought that page wasn't used for anything and later discovered you needed it, here's how you can get it back!

1) Create a new page, and enable the PHP option.
2) Paste the following code into the page, then save it:


contact:

Code

print 'Please contact us using the form below, and we\'ll get back to you as soon as possible.<br><br>
NOTE: All fields are required.<br><br>

<form action="'.$MainURL.'/pages/contact-submit" method="post"><TABLE cellSpacing=0 cellPadding=0 border=0>
<TR>
<TD align=left width=105><STRONG><font face="'.$FontFace.'" size="'.$FontSize.'">Name:</font></STRONG></TD>
<TD width="452"><INPUT class=textbox maxLength=50 size=30
name="name" style="'.$FormStyle.'"></TD></TR>
<TR>
<TD align=left width=105><STRONG><font face="'.$FontFace.'" size="'.$FontSize.'">Email:</font></STRONG></TD>
<TD width="452"><INPUT class=textbox maxLength=50 size=30
name="email" style="'.$FormStyle.'"></TD></TR>
<TR>
<TD vAlign=top align=left width="105"><STRONG><font face="'.$FontFace.'" size="'.$FontSize.'">Message:</font></STRONG></TD>
<TD vAlign=top width="452"><TEXTAREA id=message name="message" rows=10 cols=35 style="'.$FormStyle.'"></TEXTAREA><BR></TD></TR>
<TR>
<TD align=left width=105><font face="'.$FontFace.'" size="'.$FontSize.'"> </font></TD>
<TD width="452"><br><font face="'.$FontFace.'" size="'.$FontSize.'"><br><br><INPUT class=submit type="submit" value="Submit Form" name="submit" style="'.$FormStyle.'"></form></font></TD></TR></TABLE>';


contact-submit:

Code

ReadFormArguments();
Global $FormArguments;

foreach ($FormArguments as $Key=>$Value){
$FormArguments[$Key] = stripslashes($FormArguments[$Key]);
}

$FormArguments['name'] = VerifyCleanString($FormArguments['name'],2);
$FormArguments['email'] = VerifyCleanString($FormArguments['email'],1);

if ($FormArguments['name'] != '' && $FormArguments['email'] != '' && $FormArguments['message'] != '') {

$MailTo = $Settings['ContactEmail'];
$MailTitle = $Settings['SiteName'].' Web Form';
$MailFrom = 'From: '.$FormArguments['name'].' <'.$FormArguments['email'].'>';
$MailMessage = $FormArguments['message'];

mail($MailTo,$MailTitle,$MailMessage,$MailFrom);


print 'Your message has been sent. Thank you for contacting us.';

}
else {

print 'All required fields were not filled. Please complete the information requested.<br><br><form action="'.$MainURL.'/pages/contact-submit" method="post"><TABLE cellSpacing=0 cellPadding=0 border=0>
<TR>
<TD align=left width=105><STRONG><font face="Verdana" size="2">Name:</font></STRONG></TD>
<TD width="452"><font face="Verdana" size="2"><INPUT class=textbox maxLength=50 size=30
name="name" style="'.$FormStyle.'" value="'.str_replace('"','&'.'#34;',$FormArguments['name']).'"></font></TD></TR>
<TR>
<TD align=left width=105><STRONG><font face="Verdana" size="2">Email:</font></STRONG></TD>
<TD width="452"><font face="Verdana" size="2"><INPUT class=textbox maxLength=50 size=30
name="email" style="'.$FormStyle.'" value="'.str_replace('"','&'.'#34;',$FormArguments['email']).'"></font></TD></TR>
<TR>
<TD vAlign=top align=left width="105"><STRONG><font face="Verdana" size="2">Message:</font></STRONG></TD>
<TD vAlign=top width="452"><font face="Verdana" size="2"><TEXTAREA id=message name="message" rows=10 cols=35 style="'.$FormStyle.'">'.str_replace('<','&l'.'t;',$FormArguments['message']).'</TEXTAREA><BR>
</font> </TD></TR>
<TR>
<TD vAlign=top align=left width=105><font face="Verdana" size="2"> </font></TD>
<TD width="452"><br><font face="Verdana" size="2"><br><br><INPUT class=submit type="submit" value="Submit Form" name="submit" style="'.$FormStyle.'"></form>All fields are required.</font></TD></TR></TABLE>';

}



ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 

Last Edit: September 6, 2008 @ 3:32pm by DCSun
DCSun
Administrator



Posts: 625
 
September 6, 2008 @ 3:30pm
This has been replaced with a newer version in FlexCMS 2.5. That code can be found here: http://www.flexcms.com/index.php/forum/thread/251.html


FlexCMS v3.2 Has Been Released!
 

(This thread is currently Locked) 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.08973 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS