This topic is locked
[SOLVED]

 Adding a Simple Contact Form to View?

7/11/2008 1:43:22 PM
PHPRunner General questions
powersitedesign author

I have this view page setup for one of my clients projects: click here

(you will see that I have the "Contact Us" box located below the photo slideshow.
Here's the code that I want to drop in that box area:

[codebox]<?php
// Change these two variables to meet your needs.
$myemail = '{$show_resort_email},info@ownershipresorts.com,cotton.rohrscheib@pleth.com';

$subject = '{$show_resort_name}Inquiry';
$op = $_POST[op];
if($op == 'contact')

{

$name = stripslashes($_POST[name]);

$address = stripslashes($_POST[address]);

$city = stripslashes($_POST[city]);

$state1 = stripslashes($_POST[state1]);

$zip = stripslashes($_POST[zip]);

$phone_1 = stripslashes($_POST[phone_1]);

$phone_2 = stripslashes($_POST[phone_2]);

$phone_3 = stripslashes($_POST[phone_3]);

$email = stripslashes($_POST[email]);

$questions_comments = stripslashes($_POST[questions_comments]);

$referer = $_POST[referer];

$remote_host = $_SERVER[REMOTE_ADDR];

$server = $_SERVER[SERVER_NAME];

$browser = $_SERVER[HTTP_USER_AGENT];
if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$",$email))

{

$status = "We're sorry, but you've entered an incorrect email address.
";

}

if(!$name)

{

$status .= "Please enter your name.
";

}

if(!$questions_comments)

{

$status .= "Please enter a message.
";

}
if(!$status)

{

$header = "From: $email\r\nReply-To: $email\r\n";
$message = "
----- Contact Information --------------------------------------------
Name: $name

Address: $address

City: $city

State: $state1

Zip: $zip

Phone: ($phone_1)$phone_2-$phone_3

Email: $email
----- Questions / Comments--------------------------------------------
Questions/Comments: $questions_comments
----- Referer & Browser Data -----------------------------------------
Referer: $referer

Site: $server

Remote Host: $remote_host

Remote Browser: $browser
";
if(mail($myemail, $subject, $message, $header))

{

$status = "Thanks, Your Message was Sent!

";

}

else

{

$status = "Error: There was a problem with your message! Please email us: info@ownershipresorts.com.

";

}
}

else

{

$status .= "
Please press <u>back</u> on your browser to resubmit this form.

";

}

}
// Now check the referer page and ensure it's a proper URL
$referer = $_SERVER[HTTP_REFERER];
if(!preg_match('#^http://[a-z0-9-]+.([a-z0-9-]+.)?[a-z]+#i', $referer))

{

unset($referer);

}
?>
<?php print $status; ?>
<form method="post" action="../cms/<?php print $_SELF; ?>">

<input type="hidden" name="op" value="contact">

<input type="hidden" name="referer" value="<?php print $referer; ?>">

<div align="left">

<table border="0" cellpadding="2" width="300">

<tr>

<td><font face="Verdana" style="font-size: 8pt">Name:</font></td>

<td>

<input name="name" size="35" value="" tabindex="1" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">Address:</font></td>

<td>

<input name="address" size="35" value="" tabindex="3" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">City:</font></td>

<td>

<input name="city" size="35" value="" tabindex="4" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">State:</font></td>

<td>
<select name="state1" tabindex="5" style="font-family: Verdana; font-size: 8pt; color: #000000" size="1">

<option value="AL">Alabama</option>

<option value="AK">Alaska</option>

<option value="AZ">Arizona</option>

<option value="AR">Arkansas</option>

<option value="CA">California</option>

<option value="CO">Colorado</option>

<option value="CT">Connecticut</option>

<option value="DE">Delaware</option>

<option value="DC">District of Columbia</option>

<option value="FL">Florida</option>

<option value="GA">Georgia</option>

<option value="HI">Hawaii</option>

<option value="ID">Idaho</option>

<option value="IL">Illinois</option>

<option value="IN">Indiana</option>

<option value="IA">Iowa</option>

<option value="KS">Kansas</option>

<option value="KY">Kentucky</option>

<option value="LA">Louisiana</option>

<option value="ME">Maine</option>

<option value="MD">Maryland</option>

<option value="MA">Massachusetts</option>

<option value="MI">Michigan</option>

<option value="MN">Minnesota</option>

<option value="MS">Mississippi</option>

<option value="MO">Missouri</option>

<option value="MT">Montana</option>

<option value="NE">Nebraska</option>

<option value="NV">Nevada</option>

<option value="NH">New Hampshire</option>

<option value="NJ">New Jersey</option>

<option value="NM">New Mexico</option>

<option value="NY">New York</option>

<option value="NC">North Carolina</option>

<option value="ND">North Dakota</option>

<option value="OH">Ohio</option>

<option value="OK">Oklahoma</option>

<option value="OR">Oregon</option>

<option value="PA">Pennsylvania</option>

<option value="RI">Rhode Island</option>

<option value="SC">South Carolina</option>

<option value="SD">South Dakota</option>

<option value="TN">Tennessee</option>

<option value="TX">Texas</option>

<option value="UT">Utah</option>

<option value="VT">Vermont</option>

<option value="VA">Virginia</option>

<option value="WA">Washington</option>

<option value="WV">West Virginia</option>

<option value="WI">Wisconsin</option>

<option value="WY">Wyoming</option>

<option value="--">-----</option>

<option id="CAN-AB" value="AB">Alberta (AB)</option>

<option id="CAN-BC" value="BC">British Columbia (BC)</option>

<option id="CAN-MB" value="MB">Manitoba (MB)</option>

<option id="CAN-NB" value="NB">New Brunswick (NB)</option>

<option id="CAN-NL" value="NL">Newfoundland and Labrador (NL)</option>

<option id="CAN-NT" value="NT">Northwest Territories (NT)</option>

<option id="CAN-NS" value="NS">Nova Scotia (NS)</option>

<option id="CAN-NU" value="NU">Nunavut (NU)</option>

<option id="CAN-PE" value="PE">Prince Edward Island (PE)</option>

<option id="CAN-SK" value="SK">Saskatchewan (SK)</option>

<option id="CAN-ON" value="ON">Ontario (ON)</option>

<option id="CAN-QC" value="QC">Quebec (QC)</option>

<option id="CAN-YT" value="YT">Yukon (YT)</option>

<option value="-1">------</option>

<option value="-2">Not Listed</option>

</select></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">Zip Code:</font></td>

<td>

<input name="zip" size="10" value="" tabindex="6" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">Phone:</font></td>

<td>

<input name="phone_1" size="3" value="" tabindex="7" style="font-family: Verdana; font-size: 8pt; color: #000000"><input name="phone_2" size="3" value="" tabindex="7" style="font-family: Verdana; font-size: 8pt; color: #000000"><input name="phone_3" size="4" value="" tabindex="7" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">E-mail:</font></td>

<td>

<input name="email" size="35" value="" tabindex="10" style="font-family: Verdana; font-size: 8pt; color: #000000"></td>

</tr>

<tr>

<td><font face="Verdana" style="font-size: 8pt">Questions

/ Comments:</font></td>

<td>

<textarea name="questions_comments" cols="35" rows="5" tabindex="13" style="font-family: Verdana; font-size: 8pt; color: #000000"></textarea></td>

</tr>

<tr>

<td colspan="2">

<p align="center">

<font face="Verdana"><span style="font-size: 8pt">

<input type="submit" value="Contact This Resort!"></span></font></td>

</tr>

</table>

</div>

&nbsp;
&nbsp;</form>[/codebox]
This isn't working when I try to add this to the template in the visual editor, I have also made a few attempts at trying to insert this as a custom field but it's not working out that way either for me.
Again, I am just wanting to put this simple email form in place, I am not wanting to capture any data or anything just use this form as a means for the visitor to push through a message to each resort using a form.
Does anyone know what i might try to get this going?

Any help / suggestions is GREATLY APPRECIATED!!!

Thanks,

powersitedesign author 7/11/2008

also, i copied my code from the visual editor, here's that in case someone needs to see it. it's working fine, I had Jane and Sergey help me w/ customizing the photo slideshow.
[codebox]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Resorts Database (web)</TITLE>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">

<META content="MSHTML 6.00.6000.16681" name=GENERATOR></HEAD>

<BODY bgColor=#000000><script type="text/javascript" src="include/ibox.js"></script><LINK media=screen href="include/ibox.css"

type=text/css rel=stylesheet><script type="text/javascript" src="include/jquery.js"></script>{doevent name="ViewOnLoad"}<!--startPDFcut-->

<DIV align=center>

<TABLE cellPadding=2 width=645 bgColor=#f8f7e5 border=0>

<TBODY>

<TR>

<TD bgColor=#cdcaa5><SPAN style="FONT-WEIGHT: 700"><FONT

style="FONT-SIZE: 8pt" face=Verdana>Resort Details: </FONT></SPAN></TD></TR>

<TR>

<TD vAlign=top>

<DIV align=center>

<TABLE cellSpacing=4 cellPadding=4 width="100%" border=0>

<TBODY>

<TR>

<TD vAlign=top width="50%">

<DIV align=center>

<TABLE cellSpacing=3 cellPadding=3 width="100%" border=0>

<TBODY>

<TR>

<TD style="HEIGHT: 226px" height=226><IMG id=imgMainPhoto src="{$row00firstphoto_value}"></TD></TR>

<TR>

<TD>

<DIV align=center>

<TABLE cellPadding=2 width="100%" border=0>

<TBODY>

<TR>

<TD>{$show_resort_photo_1}</TD>

<TD>{$show_resort_photo_2}</TD>

<TD>{$show_resort_photo_3}</TD>

<TD>{$show_resort_photo_4}</TD></TR>

<TR>

<TD>{$show_resort_photo_5}</TD>

<TD>{$show_resort_photo_6}</TD>

<TD>{$show_resort_photo_7}</TD>

<TD>{$show_resort_photo_8}</TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD></TD></TR>

<TR>

<TD bgColor=#ebdca4><FONT

style="FONT-WEIGHT: 700; FONT-SIZE: 8pt" face=Verdana>Contact

Us:</FONT></TD></TR>

<TR>

<TD bgColor=#cdcaa5>&nbsp;

<P></P>

<P></P>

<P></P>

<P>{$show_resort_email}</P></TD></TR></TBODY></TABLE></DIV></TD>

<TD vAlign=top width="50%">

<DIV align=center>

<TABLE cellSpacing=3 cellPadding=3 width="100%" border=0>

<TBODY>

<TR>

<TD width=192><FONT style="FONT-WEIGHT: 700; FONT-SIZE: 8pt"

face=Verdana>{$show_resort_name}</FONT><FONT

style="FONT-SIZE: 8pt" face=Verdana><BR>{$show_resort_address}<BR>{$show_resort_city}, {$show_resort_state}&nbsp;{$show_resort_zip}<BR>{$show_resort_telephone_1}<BR>{$show_resort_telephone_2}<BR>{$show_resort_website}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>About Our Resort:</FONT></SPAN></TD></TR>

<TR>

<TD width=192><FONT style="FONT-SIZE: 8pt" face=Verdana>{$show_resort_notes}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Unique Amenities:</FONT></SPAN></TD></TR>

<TR>

<TD width=192 bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_unique_amenities}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Restrictions:</FONT></SPAN></TD></TR>

<TR>

<TD width=192 bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_restrictions}&nbsp;</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Attractions:</FONT></SPAN></TD></TR>

<TR>

<TD width=192 bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_attractions}</FONT></TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD vAlign=top width="100%" colSpan=2>&nbsp;</TD></TR>

<TR>

<TD vAlign=top align=middle width="100%" colSpan=2>

<DIV align=center>

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>

<TBODY>

<TR>

<TD width=265><IMG src="images/resort1.jpg" align=right

border=0></TD>

<TD><FONT style="FONT-WEIGHT: 700; FONT-SIZE: 8pt"

face=Verdana>Content Copyrighted 2008 - Ownership

Resorts</FONT></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>{literal}<script>

var _imgMainPhoto = document.getElementById("imgMainPhoto");

function LoadMainPhoto(photoUrl)

{

_imgMainPhoto.src = photoUrl;

}

</script>{/literal}<!--endPDFcut--></BODY></HTML>

[/codebox]

powersitedesign author 7/11/2008

I think that I am getting a little closer, I did some research on my Smarty syntax errors and discovered the {literal} tag and used it to wrap my php form. It's not breaking my template now but the form still doesn't work, here's my updated version of the souce code from the visual editor:
[codebox]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Resorts Database (web)</TITLE>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">

<META content="MSHTML 6.00.6000.16681" name=GENERATOR></HEAD>

<BODY bgColor=#000000><script type="text/javascript" src="include/ibox.js"></script><LINK media=screen href="include/ibox.css"

type=text/css rel=stylesheet><script type="text/javascript" src="include/jquery.js"></script>{doevent name="ViewOnLoad"}<!--startPDFcut-->

<DIV align=center>

<TABLE cellPadding=2 width=645 bgColor=#f8f7e5 border=0>

<TBODY>

<TR>

<TD bgColor=#cdcaa5><SPAN style="FONT-WEIGHT: 700"><FONT

style="FONT-SIZE: 8pt" face=Verdana>Resort Details: </FONT></SPAN></TD></TR>

<TR>

<TD vAlign=top>

<DIV align=center>

<TABLE cellSpacing=4 cellPadding=4 width="100%" border=0>

<TBODY>

<TR>

<TD vAlign=top width="50%">

<DIV align=center>

<TABLE cellSpacing=3 cellPadding=3 width="100%" border=0>

<TBODY>

<TR>

<TD style="HEIGHT: 226px" width=300 height=226><IMG id=imgMainPhoto src="{$row00firstphoto_value}"></TD></TR>

<TR>

<TD>

<DIV align=center>

<TABLE cellPadding=2 width=300 border=0>

<TBODY>

<TR>

<TD>{$show_resort_photo_1}</TD>

<TD>{$show_resort_photo_2}</TD>

<TD>{$show_resort_photo_3}</TD>

<TD>{$show_resort_photo_4}</TD></TR>

<TR>

<TD>{$show_resort_photo_5}</TD>

<TD>{$show_resort_photo_6}</TD>

<TD>{$show_resort_photo_7}</TD>

<TD>{$show_resort_photo_8}</TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD></TD></TR>

<TR>

<TD bgColor=#ebdca4><FONT

style="FONT-WEIGHT: 700; FONT-SIZE: 8pt" face=Verdana>Contact

Us:</FONT></TD></TR>

<TR>

<TD bgColor=#cdcaa5><!-- THIS IS WHERE THE FORM CODE NEEDS TO BE DROPPED INTO THE TEMPLATE -->{literal}<?php
// Change these two variables to meet your needs.
$myemail = 'cotton.rohrscheib@pleth.com';

$subject = '{$show_resort_name} Inquiry';
$op = $_POST[op];
if($op == 'contact')

{

$name = stripslashes($_POST[name]);

$address = stripslashes($_POST[address]);

$city = stripslashes($_POST[city]);

$state1 = stripslashes($_POST[state1]);

$zip = stripslashes($_POST[zip]);

$phone_1 = stripslashes($_POST[phone_1]);

$phone_2 = stripslashes($_POST[phone_2]);

$phone_3 = stripslashes($_POST[phone_3]);

$email = stripslashes($_POST[email]);

$questions_comments = stripslashes($_POST[questions_comments]);

$referer = $_POST[referer];

$remote_host = $_SERVER[REMOTE_ADDR];

$server = $_SERVER[SERVER_NAME];

$browser = $_SERVER[HTTP_USER_AGENT];
if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$",$email))

{

$status = "
Please enter a valid email address.
";

}

if(!$name)

{

$status .= "Please enter your name.
";

}

if(!$questions_comments)

{

$status .= "Please enter a message.
";

}
if(!$status)

{

$header = "From: $email\r\nReply-To: $email\r\n";
$message = "
----- Contact Information --------------------------------------------
Name: $name

Company: $company

Address: $address

City: $city

State: $state1

Zip: $zip

Phone: ($phone_1)$phone_2-$phone_3

Email: $email

Method: $method / $method_other
----- Questions / Comments--------------------------------------------
Questions/Comments: $questions_comments
----- Referer & Browser Data -----------------------------------------
Referer: $referer

Site: $server

Remote Host: $remote_host

Remote Browser: $browser
";
if(mail($myemail, $subject, $message, $header))

{

$status = "Thanks, Your Message was Sent!

";

}

else

{

$status = "Error: There was a problem with your message! Please email us: info@ownershipresorts.com.

";

}
}

else

{

$status .= "
Please press <u>back</u> on your browser to resubmit this form.

";

}

}
// Now check the referer page and ensure it's a proper URL
$referer = $_SERVER[HTTP_REFERER];
if(!preg_match('#^http://[a-z0-9-]+.([a-z0-9-]+.)?[a-z]+#i';, $referer))

{

unset($referer);

}
?><?php print $status; ?></SPAN>

<P></P>

<FORM language=JavaScript name=FrontPage_Form1

onsubmit="return FrontPage_Form1_Validator(this)"

action="<?php print $_SELF; ?>" method=post><input type="hidden" name="op" value="contact"><input type="hidden" name="referer" value="<?php print $referer; ?>">

<TABLE style="WIDTH: 284px" cellSpacing=1>

<TBODY>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>Name:*</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><!--webbot bot="Validation" b-value-required="TRUE" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=1 size=25 name=name></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>Address:</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=3 size=25 name=address></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>City:</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=4 size=25 name=city></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>State/Province:</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><select name="state1" tabindex="5" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #FFFFFF; background-color:#FFFFA0" size="1">

<option value="AL">Alabama</option>

<option value="AK">Alaska</option>

<option value="AZ">Arizona</option>

<option value="AR">Arkansas</option>

<option value="CA">California</option>

<option value="CO">Colorado</option>

<option value="CT">Connecticut</option>

<option value="DE">Delaware</option>

<option value="DC">District of Columbia</option>

<option value="FL">Florida</option>

<option value="GA">Georgia</option>

<option value="HI">Hawaii</option>

<option value="ID">Idaho</option>

<option value="IL">Illinois</option>

<option value="IN">Indiana</option>

<option value="IA">Iowa</option>

<option value="KS">Kansas</option>

<option value="KY">Kentucky</option>

<option value="LA">Louisiana</option>

<option value="ME">Maine</option>

<option value="MD">Maryland</option>

<option value="MA">Massachusetts</option>

<option value="MI">Michigan</option>

<option value="MN">Minnesota</option>

<option value="MS">Mississippi</option>

<option value="MO">Missouri</option>

<option value="MT">Montana</option>

<option value="NE">Nebraska</option>

<option value="NV">Nevada</option>

<option value="NH">New Hampshire</option>

<option value="NJ">New Jersey</option>

<option value="NM">New Mexico</option>

<option value="NY">New York</option>

<option value="NC">North Carolina</option>

<option value="ND">North Dakota</option>

<option value="OH">Ohio</option>

<option value="OK">Oklahoma</option>

<option value="OR">Oregon</option>

<option value="PA">Pennsylvania</option>

<option value="RI">Rhode Island</option>

<option value="SC">South Carolina</option>

<option value="SD">South Dakota</option>

<option value="TN">Tennessee</option>

<option value="TX">Texas</option>

<option value="UT">Utah</option>

<option value="VT">Vermont</option>

<option value="VA">Virginia</option>

<option value="WA">Washington</option>

<option value="WV">West Virginia</option>

<option value="WI">Wisconsin</option>

<option value="WY">Wyoming</option>

<option value="--">-----</option>

<option id="CAN-AB" value="AB">Alberta</option>

<option id="CAN-BC" value="BC">British Columbia</option>

<option id="CAN-MB" value="MB">Manitoba</option>

<option id="CAN-NB" value="NB">New Brunswick</option>

<option id="CAN-NL" value="NL">New & Lab</option>

<option id="CAN-NT" value="NT">NW Territories</option>

<option id="CAN-NS" value="NS">Nova Scotia</option>

<option id="CAN-NU" value="NU">Nunavut</option>

<option id="CAN-PE" value="PE">PEI</option>

<option id="CAN-SK" value="SK">Saskatchewan</option>

<option id="CAN-ON" value="ON">Ontario</option>

<option id="CAN-QC" value="QC">Quebec</option>

<option id="CAN-YT" value="YT">Yukon</option>

<option value="-1">------</option>

<option value="-2">Not Listed</option></select></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>Zip Code:</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="10" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=6 maxLength=10 size=10 name=zip></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>Telephone:</FONT></TD>

<TD align=left width=169><FONT style="FONT-SIZE: 8pt"

face=Verdana>(</FONT><FONT color=#ffffff><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=7 maxLength=3 size=3 name=phone_1></FONT><FONT

face=Verdana><SPAN

style="FONT-SIZE: 8pt">)</SPAN></FONT><FONT

color=#ffffff><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=7 maxLength=3 size=3 name=phone_2>-<!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="4" s-validation-constraint="Greater than or equal to" s-validation-value="0000" s-validation-constraint="Less than or equal to" s-validation-value="9999" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=7 maxLength=4 size=4 name=phone_3></FONT></TD></TR>

<TR>

<TD align=left width=163><FONT style="FONT-SIZE: 8pt"

face=Verdana>Email Address:</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" s-allow-other-chars="@." b-value-required="TRUE" --><INPUT

style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0"

tabIndex=10 size=25 name=email></FONT></TD></TR>

<TR>

<TD align=left width=163>&nbsp;</TD>

<TD align=left width=169>&nbsp;</TD></TR>

<TR>

<TD vAlign=top align=left width=163><FONT

style="FONT-SIZE: 8pt" face=Verdana>Questions /

Comments:
</FONT></TD>

<TD align=left width=169><FONT color=#ffffff><!--webbot bot="Validation" b-value-required="TRUE" --><TEXTAREA style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffa0" tabIndex=13 name=questions_comments rows=5 cols=25></TEXTAREA></FONT></TD></TR>

<TR>

<TD vAlign=top width=163>&nbsp;</TD>

<TD align=left width=169><FONT style="FONT-SIZE: 8pt"

face=Verdana>* = Required Fields</FONT></TD></TR>

<TR>

<TD colSpan=2>&nbsp;</TD></TR>

<TR>

<TD colSpan=2>

<P align=center><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ebdca4" type=submit value=Submit></P></TD></TR></TBODY></TABLE>&nbsp;</FORM>{/literal}<!-- INSIDE THIS FORM I NEED TO PASS ALONG TWO RECORDS FROM THE DATABASE FOR EACH RESORT, {$show_resort_name} {$show_resort_email} --><!-- THIS IS WHERE THE FORM CODE ENDS -->

<P></P>

<P></P>

<P></P>

<P>{$show_resort_email}</P></TD></TR></TBODY></TABLE></DIV></TD>

<TD vAlign=top width=340>

<DIV align=center>

<TABLE cellSpacing=3 cellPadding=3 width="100%" border=0>

<TBODY>

<TR>

<TD width="100%"><FONT

style="FONT-WEIGHT: 700; FONT-SIZE: 8pt" face=Verdana>{$show_resort_name}</FONT><FONT

style="FONT-SIZE: 8pt" face=Verdana><BR>{$show_resort_address}<BR>{$show_resort_city}, {$show_resort_state}&nbsp;{$show_resort_zip}<BR>{$show_resort_telephone_1}<BR>{$show_resort_telephone_2}<BR>{$show_resort_website}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>About Our Resort:</FONT></SPAN></TD></TR>

<TR>

<TD width="100%"><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_notes}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Unique Amenities:</FONT></SPAN></TD></TR>

<TR>

<TD width="100%" bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_unique_amenities}</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Restrictions:</FONT></SPAN></TD></TR>

<TR>

<TD width="100%" bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_restrictions}&nbsp;</FONT></TD></TR>

<TR>

<TD width=192>&nbsp;</TD></TR>

<TR>

<TD width=192 bgColor=#ebdca4><SPAN

style="FONT-WEIGHT: 700"><FONT style="FONT-SIZE: 8pt"

face=Verdana>Attractions:</FONT></SPAN></TD></TR>

<TR>

<TD width="100%" bgColor=#cdcaa5><FONT style="FONT-SIZE: 8pt"

face=Verdana>{$show_resort_attractions}</FONT></TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD vAlign=top width="100%" colSpan=2>&nbsp;</TD></TR>

<TR>

<TD vAlign=top align=middle width="100%" colSpan=2>

<DIV align=center>

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>

<TBODY>

<TR>

<TD width=265><IMG src="images/resort1.jpg" align=right

border=0></TD>

<TD><FONT style="FONT-WEIGHT: 700; FONT-SIZE: 8pt"

face=Verdana>Content Copyrighted 2008 - Ownership

Resorts</FONT></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></DIV></TD></TR>

<TR>

<TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>{literal}<script>

var _imgMainPhoto = document.getElementById("imgMainPhoto");

function LoadMainPhoto(photoUrl)

{

_imgMainPhoto.src = photoUrl;

}

</script>{/literal}<!--endPDFcut--></BODY></HTML>

[/codebox]
Any ideas on what I need to do to get this form working correctly?

Thanks,

powersitedesign author 7/14/2008

Just wanted to update this in case anyone else ever tries to insert an email contact form onto a view page. I was able to get this working, just had to insert a form that was processed off of the site. I am still not for sure why but when I tried to enter in php code into smarty it really didn't handle it well at all and I tried a few suggestions from smarty's message board and no one there could really help me either. Here's a link to the example in case you are interested,
http://www.ownershipresorts.com/cms/resort...php?editid1=145

G
griller 7/15/2008

Just wanted to update this in case anyone else ever tries to insert an email contact form onto a view page. I was able to get this working, just had to insert a form that was processed off of the site. I am still not for sure why but when I tried to enter in php code into smarty it really didn't handle it well at all and I tried a few suggestions from smarty's message board and no one there could really help me either. Here's a link to the example in case you are interested,

http://www.ownershipresorts.com/cms/resort...php?editid1=145


Any chance you could share how you did it please? would be handy to know,

Thanks

ps.. I looked at your code and see what you have done. ok thanks

powersitedesign author 7/15/2008

Any chance you could share how you did it please? would be handy to know,

Thanks

ps.. I looked at your code and see what you have done. ok thanks


Hey, I just went to one of those websites that has the monthly fee for processing your email forms and generated some of their code and stuck it in there. They use HTML instead of PHP usually, it worked! :-)