close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert Contact Form into existing page

Thread began 1/07/2010 9:50 am by gcrozier395733 | Last modified 1/15/2010 11:21 pm by neilo | 4326 views | 10 replies |

gcrozier395733

Insert Contact Form into existing page

Having trouble following "Incorporating Contact Form Solutions Pack into an existing site." I have an existing site and page already set up into which I would like to place contact form script, fields, etc. Yet the instructions only cover doing so for dwt templates. Consequently, when I copy the solution pack folder into my current site in Dreamweaver, there are no files in assets location and therefore no provision for applying templates as described in steps 3-7.
How do I accomplish this?
Thanks]
Greg

Sign in to reply to this post

Jimmy Wu

Basically, for the form to work correctly, you will have to copy the code that is above the DOCTYPE tag:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

And place it at the beginning of your file. Make sure you don't leave any whitespace such as extra spaces or empty lines. Also if your DOCTYPE tag looks different from this one, you may need to replace your DOCTYPE tag with the one in the contact form.

Then you will have to copy the content included between the head tags and place the content into your head tags. You will have to do the same with the body tags. Your new page should be at the same relative location to the Contact Form directories as the original page was so that all the include paths will be correct.

Sign in to reply to this post

gcrozier395733

Details

Hi Jimmy,
Thanks for getting back to me so quickly. Your instructions, while certainly concise, just aren't registering with me. THe problem is compounded by the fact that my hosting company says the following:

QUOTE: Register.com does not provide custom code nor provide support for custom code. Having said that, we do have some information to help you get your forms up and running. If you run into troubles getting these scripts configured you will need to consult the documentation provided for the scripts as we do not provide custom coding support. All the information we can provide is included in this email.

This will help you to get your email script working, simply follow these steps:

-- 1. Download a pre-made form mail script.


You can find these easily by searching google for "formmail script". One we have found is www.form2email.net/ which I've been told is one of the easier ones to use. They usually come with limited support from the programmer as well as readme files you can consult for help.


-- 2. Customize the script with the proper settings. --

Unfortunately this part we cannot help you with for legal reasons. We're not allowed to assist with custom programming and coding. If you run into problems you'll have to either contact a web developer for advice, or the web site that you received the script from for support.



Here are some things you'll have to change in the script for it to work on our server.

{

- Sendmail Path: /usr/sbin/sendmail -i-t

- Perl Path: /usr/bin/perl

}



You will also have to modify your form page to point to your script. You will have to modify the "action" or where the form points, to the script.

Your script, once uploaded, will be located at "http://yourdomain.com/cgi-bin/script.pl". You would replace "script.pl" with the actual file name of the script.


-- 3. Upload the script. --

For this you will need an FTP program. Some popular ones are as follows:

{

- CuteFTP

- SmartFTP

- FileZilla

- Fetch (Mac users)

}



You would upload the script into your "cgi-bin" folder using "ASCII" or "Text" mode. We can help walk you through this if you run into problems.

-- 4. Set the permissions. --

For your script to operate properly you want the visitor to your site to be able to execute the script, but you don't want them to have the right to overwrite the file. For most scripts you want permissions to be set for rwxr-xr-x(755). You can read/write/execute, but the visitor can only execute.

You can set the permissions through your FTP program, or through FileManager. We can help you with this as well. QUOTE

My existing page script is this:

<!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" xml:lang="en" lang="en">
<!--Design by gcroz -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chaba Thai Template</title>
<meta name="description" content="" />
<link href="CssFiles/cmsbiz.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('plugins/images/link_one_over.gif','plugins/images/link_two_over.gif','plugins/images/link_three_over.gif','plugins/images/link_four_over.gif','plugins/images/link_five_over.gif','plugins/images/link_six_over.gif')">
<div id="wrapper">
<div id="header">
<img src="images/logo.gif" alt="" width="769" height="41" border="0" usemap="#Map3" />
<map name="Map3" id="Map3">
<area shape="rect" coords="587,6,721,34" href="pdfs/WebTakeout 12-09.pdf" alt="Menu Download" />
</map>
<div id="topnav"><a href="index.html"><img src="images/link_one.gif" alt="Home" name="one" width="134" height="43" border="0" id="one" onmouseover="MM_swapImage('one','','plugins/images/link_one_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a><a href="aboutus.html"><img src="images/link_two.gif" alt="About Us" name="two" width="127" height="43" border="0" id="two" onmouseover="MM_swapImage('two','','plugins/images/link_two_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a><a href="specials.html"><img src="images/link_three.gif" alt="Specials" name="three" width="127" height="43" border="0" id="three" onmouseover="MM_swapImage('three','','plugins/images/link_three_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a><a href="catering.html"><img src="images/link_four.gif" alt="Catering" name="four" width="122" height="43" border="0" id="four" onmouseover="MM_swapImage('four','','plugins/images/link_four_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a><a href="directions.php"><img src="images/link_five.gif" alt="Directions" name="five" width="124" height="43" border="0" id="five" onmouseover="MM_swapImage('five','','plugins/images/link_five_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a><a href="contactus.html"><img src="images/link_six_over.gif" alt="Contact Us" name="six" width="134" height="43" border="0" id="six" onmouseover="MM_swapImage('six','','plugins/images/link_six_over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></div>
<!-- Close header -->
</div>
<div id="strap"></div>
<div id="leftcol"> <a href="munuIntro.html"><img src="images/h3_bg.gif" alt="" width="170" height="26" /></a>
<ul>
<li><a href="menuApps.html" tabindex="13">Appetizers</a></li>
<li><a href="menuSoups.html" tabindex="14">Soups</a></li>
<li><a href="menuSalad.html" tabindex="15">Salads </a></li>
<li><a href="menuMainSpec.html" tabindex="16">Main Dishes/Specials</a></li>
<li><a href="menuNdleCry.html" tabindex="17">Noodles & Curry</a></li>
<li><a href="menuRice.html" tabindex="18">Fried Rice</a></li>
<li><a href="menuVeg.html" tabindex="19">Vegetable</a></li>
<li><a href="menuLunch.html" tabindex="20">Lunch </a></li>
<li><a href="menuwinebeespirits.html" tabindex="21">Wine Beer Spirits</a></li>
<li><a href="drinkspecials.html" tabindex="22">Drink Specials</a></li>
<li><a href="javascript:;" tabindex="23">Desserts</a></li>
</ul>
<!-- Close LeftCol -->
</div>
<div id="content">

<!--FORM BEGINS HERE- STYLED VIA THE STYLESHEET-->
<h1>Contact Us</h1>

</div>
<div id="footer">
<p>Copyright &copy;Chaba Thai Cuisine<br />
2010</p>
</div>
<!-- Wrapper End-->
</div>
</body>
</html>


I honestly do not understand what goes where. Please be so kind as to lend me your expertise so that I might offer visitors the opportunity to correspond with us, the reason for purchasing the Contact Form Solution Pack

Sign in to reply to this post

gcrozier395733

Still waiting on support for incorporating form into existing page. See post 1/7/10.
Thanks,
Greg

Sign in to reply to this post

Office Guy-172461

Keep in mind that you posted a little more than 2 hours before they left for the weekend. Your last post came 4 hours before they return from the weekend. See the support hours posted at the top of the forum.

Sign in to reply to this post

gcrozier395733

Understood.

Sign in to reply to this post

Jimmy Wu

Your page should have the layout with some general sections like this:
[PHP code at the top of the page]
<DOC Tag>
<html>
<head>
[code inside head tag]
</head>
<body>
[code inside body tag]
</body>
</html>

You will have to copy the PHP code at the top of the page to the top of the page you are trying to add the functionality to. A PHP code block looks like this:
<?php some code ?>

Make sure there is no whitespace between the php code blocks:
good:
<?php some code ?>
<?php more code ?>

bad:
<?php some code ?>

<?php more code ?>

Having whitespace between the code blocks causes problems.

You will also have to copy the code between <head> and </head> to the corresponding location on your other page and the same with the code between <body> and </body>

Sign in to reply to this post

gcrozier395733

Thank you Jimmy. I will give it a try.

Sign in to reply to this post

Jimmy Wu

Let me know if you run into any additional issues. Hopefully none of your existing scripts will interfere.

Sign in to reply to this post

edgar294281

Contact Form in Not Working!

I've installed the contact form solution pack. I got the form placed into an exiting webpage and uploaded it on the web server. The form looks great but is not sending anything. I click the submit button and nothing happens. The information that were placed in the form resets.

Question?
1. Do I need to give the contactus.php a "form Action" or leave it blank?

EP

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...