Need help with a contact form

Discussion in 'JavaScript' started by 123, Jan 7, 2011.

  1. #1
    Hi,
    I have this contact form, I cannot figure out where the 'send to email id (my)' is to be added
    Could someone please help me.

    I tried searching for the solution on Google and although I could not figure out the answer, by looking at the results I am assuming that this is Javascript and hence am requesting it here, am sorry if it is not Javascript.

    Thanks in advance
    -------------
    
    <form action="" method="post" id="form">
                        <div class="form"><span>
                          <input type="text" value="Your Name:" onfocus="if(this.value=='Your Name:'){this.value=''}" onblur="if(this.value==''){this.value='Your Name:'}" />
                          </span></div>
                        <div class="form"><span>
                          <input type="text" value="E-mail:" onfocus="if(this.value=='E-mail:'){this.value=''}" onblur="if(this.value==''){this.value='E-mail:'}" />
                          </span></div>
                        <div class="form1"><span>
                          <textarea cols="1" rows="1">Message:</textarea>
                          </span></div>
                        <div class="wrapper"><a href="#" class="link1" onclick="document.getElementById('form').submit()"><em><b>Send</b></em></a><a href="#" class="link1" onclick="document.getElementById('form').reset()"><em><b>Clear</b></em></a></div>
                      </form>
    
    Code (markup):
     
    Last edited: Jan 8, 2011
    123, Jan 7, 2011 IP
  2. Mister Lancer

    Mister Lancer Peon

    Messages:
    150
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is just a part of template, where's the whole code? most of the contact forms use PHP code to function.
     
    Mister Lancer, Jan 7, 2011 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Where did you get that contact form?

    You can use mailto and an email address. That will open an email client with a message ready to send, but your form needs names assigned to the inputs first.
    <form action="mailto:me@example.com" method="post" id="form">
    Code (markup):
    I agree with Mister Lancer, there must be more to it than just this form.
     
    Cash Nebula, Jan 8, 2011 IP
  4. 123

    123 Peon

    Messages:
    621
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the replies guys
    Yes it is part of a paid template, but I cannot possibly give the whole template here, is there any particular file that I should be looking out for, maybe I can give you the details of that file here. The site is in HTML (from Template monster).

    I tried that and as you rightly mentioned it opened Outlook express.

    I wonder why do these guys give templates which are half baked, I would prefer something where we just had to configure it by adding the email id.
     
    123, Jan 8, 2011 IP
  5. Mister Lancer

    Mister Lancer Peon

    Messages:
    150
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Template monster? I'm sure it's PHP based contact forms :) I recently bought a contact form from CodeCanyon and it's a PHP based.

    CodeCanyon configuration :-
    $address = "support@yoursite.com";
    Code (markup):
    Find this $address and replace support@yoursite.com with your email. This is for CodeCanyon and may be different with Template Monster :)
     
    Mister Lancer, Jan 8, 2011 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Cash Nebula, Jan 8, 2011 IP
  7. 123

    123 Peon

    Messages:
    621
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for the reply

    Mister Lancer, the template is HTML and not Php driven, all the files end in .html and there is not a shred of php in the code. Am planning to check it out with Template monster's support.

    Cash Nebula, I will take your suggestion, also the code that you pasted looks similar to my code so I should be close to the solution, maybe a little digging will help also I suppose the support people will guide me.

    Thanks guys :)
     
    123, Jan 8, 2011 IP
  8. Mister Lancer

    Mister Lancer Peon

    Messages:
    150
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You should read Cash Nebula tutorial links, it might helping you out. If not PHP, it's might ASP or something else :)
     
    Last edited: Jan 8, 2011
    Mister Lancer, Jan 8, 2011 IP
  9. 123

    123 Peon

    Messages:
    621
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Nope, its just plain html, thanks anyway am working on it :)
     
    Last edited: Jan 9, 2011
    123, Jan 9, 2011 IP
  10. prasanthmj

    prasanthmj Member

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #10
    You can link the form (update the form 'action')to a contact form processor script See this page for a sample script:
    contact form for your website
     
    prasanthmj, Jan 10, 2011 IP