Installing Contact Forms

  • nhood01
  • Newbie
  • Newbie
  • nhood01
  • Posts: 11

Post 3+ Months Ago

Hi, I downloaded a pre-made, Ajax contact form to use on my site. I know absolutely nothing about php. I'm having difficulties installing it. I don't understand how put the form onto your page. Most of the steps i followed were easy, but i didn't see anything that explained how to actually position the form on your page where you want it. Could someone give me a really basic set of steps to do this? or direct me to a resource that could help... like for someone who knows next to nothing about websites.

Thanks.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

To help us help you, you could start by posting the contact form you have downloaded. I mean, where you got it from.
  • nhood01
  • Newbie
  • Newbie
  • nhood01
  • Posts: 11

Post 3+ Months Ago

http://www.dustindiaz.com/ajax-contact-form/
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

Alright... this should be easy with the following steps.

Put the following lines of code between the <head>...</head> codes:
Code: [ Select ]
<script type="text/javascript" src="js/functionAddEvent.js"></script>
<script type="text/javascript" src="js/contact.js"></script>
<script type="text/javascript" src="js/xmlHttp.js"></script>
<style type='text/css' media='screen,projection'>
<!--
body { margin:20px auto;width:600px;padding:20px;border:1px solid #ccc;background:#fff;font-family:georgia,times,serif; }
fieldset { border:0;margin:0;padding:0; }
label { display:block; }
input.text,textarea { width:300px;font:12px/12px 'courier new',courier,monospace;color:#333;padding:3px;margin:1px 0;border:1px solid #ccc; }
input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; }

-->
</style>
  1. <script type="text/javascript" src="js/functionAddEvent.js"></script>
  2. <script type="text/javascript" src="js/contact.js"></script>
  3. <script type="text/javascript" src="js/xmlHttp.js"></script>
  4. <style type='text/css' media='screen,projection'>
  5. <!--
  6. body { margin:20px auto;width:600px;padding:20px;border:1px solid #ccc;background:#fff;font-family:georgia,times,serif; }
  7. fieldset { border:0;margin:0;padding:0; }
  8. label { display:block; }
  9. input.text,textarea { width:300px;font:12px/12px 'courier new',courier,monospace;color:#333;padding:3px;margin:1px 0;border:1px solid #ccc; }
  10. input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; }
  11. -->
  12. </style>

And put the following where you want the form to show:
Code: [ Select ]
<p id="loadBar" style="display:none;">
    <strong>Sending Email via slick AJAX. Hold on just a sec&#8230;</strong>
    <img src="img/loading.gif" alt="Loading..." title="Sending Email" />
</p>
<p id="emailSuccess" style="display:none;">
    <strong style="color:green;">Success! Your Email has been sent.</strong>
</p>
<div id="contactFormArea">
    <form action="scripts/contact.php" method="post" id="cForm">
        <fieldset>
            <label for="posName">Name:</label>
            <input class="text" type="text" size="25" name="posName" id="posName" />
            <label for="posEmail">Email:</label>
            <input class="text" type="text" size="25" name="posEmail" id="posEmail" />
            <label for="posRegard">Regarding:</label>
            <input class="text" type="text" size="25" name="posRegard" id="posRegard" />
            <label for="posText">Message:</label>
            <textarea cols="50" rows="5" name="posText" id="posText"></textarea>
            <label for="selfCC">
                <input type="checkbox" name="selfCC" id="selfCC" value="send" /> Send CC to self
            </label>
            <label>
                <input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " />
            </label>
        </fieldset>
    </form>
</div>
  1. <p id="loadBar" style="display:none;">
  2.     <strong>Sending Email via slick AJAX. Hold on just a sec&#8230;</strong>
  3.     <img src="img/loading.gif" alt="Loading..." title="Sending Email" />
  4. </p>
  5. <p id="emailSuccess" style="display:none;">
  6.     <strong style="color:green;">Success! Your Email has been sent.</strong>
  7. </p>
  8. <div id="contactFormArea">
  9.     <form action="scripts/contact.php" method="post" id="cForm">
  10.         <fieldset>
  11.             <label for="posName">Name:</label>
  12.             <input class="text" type="text" size="25" name="posName" id="posName" />
  13.             <label for="posEmail">Email:</label>
  14.             <input class="text" type="text" size="25" name="posEmail" id="posEmail" />
  15.             <label for="posRegard">Regarding:</label>
  16.             <input class="text" type="text" size="25" name="posRegard" id="posRegard" />
  17.             <label for="posText">Message:</label>
  18.             <textarea cols="50" rows="5" name="posText" id="posText"></textarea>
  19.             <label for="selfCC">
  20.                 <input type="checkbox" name="selfCC" id="selfCC" value="send" /> Send CC to self
  21.             </label>
  22.             <label>
  23.                 <input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " />
  24.             </label>
  25.         </fieldset>
  26.     </form>
  27. </div>

I think that would be it... don't forget to put the included files in the correct directories, or if you need them in a different directory, don't forget to edit the src in the inclusion HTML (The parts that goes between the <head>...</head>).
  • nhood01
  • Newbie
  • Newbie
  • nhood01
  • Posts: 11

Post 3+ Months Ago

Thanks for taking the time to show me that. I really appreciate it. This helps immensely :)
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

I suppose this helped you fix your problem. Your welcome :D
  • nhood01
  • Newbie
  • Newbie
  • nhood01
  • Posts: 11

Post 3+ Months Ago

Where in that code do i put my e-mail address?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

Open the directory scripts there, you will see two files... in those two files, at the very beginning, you will see the following lines:


contact.php and xmlHttpRequest.php wrote:
// Change the 4 variables below
$yourName = 'John Doe';
$yourEmail = 'user@example.com';
$yourSubject = 'testJax';
$referringPage = 'http://www.example.com/testJax/index.php';

Change them to what they should be.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 74 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.