Contact form with simple question what is 2+2?

Discussion in 'HTML & Website Design' started by partyboy, Sep 22, 2014.

  1. #1
    Hi all i am a new member here soon i will present myself.
    But anyway here is my problem, i am trying to set up a contact form on my website, and i want the person contacting to answer a question like "what is 2+2?" and if he doesnt answer 4 he will not be able to send mail using the form.

    My contact form consist of three files basically form-validation.js contact.html and send-mail.php

    I hope you can help me out here because there must be something i forgot to do.
     
    Solved! View solution.
    partyboy, Sep 22, 2014 IP
  2. partyboy

    partyboy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Maybe there should be this variable to.
    var question = $("#question").val();

    ???
     
    partyboy, Sep 22, 2014 IP
  3. partyboy

    partyboy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Bump anyone?
     
    partyboy, Sep 24, 2014 IP
  4. www_HypeFree_com

    www_HypeFree_com Active Member

    Messages:
    218
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    65
    #4
    Is it a wordpress? If so there are plugins that can do that without any coding needed.
     
    www_HypeFree_com, Sep 24, 2014 IP
  5. #5
    Putting an email address on a webpage is a really bad idea. Using a hidden input cause it not to display, but it is still in the source code and can be read by spambots. It are looking to prevent automated input (very weak method BTW), but you are leaving an invitation to a much larger problem that may result in a lot of sam to that email address.

    I don't know why you think you need the javascript. the validaton you need can be done automatically with HTML5 by using apprpriate types on the inputs like url.

    You do not need to set the to for the email until the form is sent to the server. I do a similar thing on my personal site using a contact form like this:
    Putting an email address on a webpage is a really bad idea. Using a hidden input cause it not to display, but it is still in the source code and can be read by spambots. It are looking to prevent automated input (very weak method BTW), but you are leaving an invitation to a much larger problem that may result in a lot of sam to that email address.

    I don't know why you think you need the javascript. the validaton you need can be done automatically with HTML5 by using appropriate types on the inputs like url.

    You do not need to set the to for the email until the form is sent to the server. I do a similar thing on my personal using a contact form like this: http://coboldinosaur.com/pages/Basic_Contact_Form.html
     
    COBOLdinosaur, Sep 24, 2014 IP
  6. partyboy

    partyboy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Hello COBOLdinosaur
    Im kinda confused here :/ I already did the javascript coding part it seems to work fine exept the validation issue.
    But maybe it is better to put a distorded image on my website containing my email for example ?
    I have used ths solution in the past with success and no spam at all frankly! But it is easier for someone to get in touch with me using a contact form.
    Also i noticed your contact form did not have any validation at all?

    /Best regards Partyboy
     
    partyboy, Sep 24, 2014 IP
  7. partyboy

    partyboy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    Yeah the blog is wordpress and it is located at www.mydomain.com/blog
    Therefore i still want my website to be located at www.mydomain.com with links from main to /blog
    I have already implemented so that the latest blog posts shows upp on my main web site,


    /Best regards Partyboy
     
    partyboy, Sep 24, 2014 IP
  8. www_HypeFree_com

    www_HypeFree_com Active Member

    Messages:
    218
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    65
    #8
    since it's wordpress you can do this with a plugin there are a few that let you submit a form with a validation like the 2+2
     
    www_HypeFree_com, Sep 24, 2014 IP