Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9059489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:59:31+00:00 2026-06-16T14:59:31+00:00

All, I’ve got a form on my page that I use to send emails.

  • 0

All,
I’ve got a form on my page that I use to send emails. On the form page I have the following code:

<input type="text" name="Name" id="your_name" class="contact_form_input_text">
<input type="text" name="Email_Address" id="your_email" class="contact_form_input_text">
<input type="text" name="fill_me_out" id="fill_me_out">
<input type="button" value="Send" id="submit_contact_form_button">

The first text box is a lamecaptcha and I check it on the PHP side to make sure that it wasn’t filled out. I also hide it using some JS with this:

jQuery(function(){
    jQuery("#fill_me_out").hide();
});

I then have the following form validation before my page submits using jQuery validator:

jQuery("#contact_form").validate({
    rules: {
        Email_Address: {
            required: true,
            email: true
        },
        Name: {
            required: true
        }
    },
    messages: {
        Email_Address: {
            required: "Please enter an email address!",
            email: "Please enter a valid email address!"
        },
        Name: {
            required: "Please enter your Name!"
        }
    }
});

jQuery("#submit_contact_form_button").click(function(event) {
      if (jQuery("#contact_form").valid()) {
        challengeField = jQuery("input#recaptcha_challenge_field").val();
            responseField = jQuery("input#recaptcha_response_field").val();
            var html = jQuery.ajax({
            type: "POST",
            url: site_url + "ajax.recaptcha.php",
            data: "recaptcha_challenge_field=" + challengeField + "&recaptcha_response_field=" + responseField,
            async: false
            }).responseText;

            if(html == "success")
            {
                //$("#captchaStatus").html(" ");
                // Uncomment the following line in your application
                //return true;
                jQuery("#contact_form").submit();
            }else{
                jQuery("#captchaStatus").html("Your captcha is incorrect. Please try again");
                Recaptcha.reload();
                return false;
            }
      }
      return false;
    });

If everything is filled out correctly the page then submits. I have the following check to check the lame captcha:

$lamecaptcha_check = $_POST['fill_me_out'];
if($lamecaptcha_check!=""){
    echo '[box style="alert"]Why are you trying to spam us? It could be because you don\'t have Javascript enabled and filled out an incorrect box![/box]';
}else{
    //Send the form using mail
}

To submit the form is a button and not a submit so it has to go through the jquery validation to do even be submitted. Somehow I’m still getting blank email messages to come through. Does anyone know anything else I can possibly do to prevent spam/blank email messages? I was thinking I should check the variables on the back end to make sure they are not blank but the form shouldn’t even be submitted unless there are some values so I require a valid email address on the initial page. Any ideas are appreciated!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:59:32+00:00Added an answer on June 16, 2026 at 2:59 pm

    Just because you have a submit button go through jQuery to work, doesn’t mean the form can’t be submitted otherwise.

    A spambot would probably examine the HTML of your form, look at the different fields, and then just send a POST request with the relevant information. It will not evaluate your jQuery.

    If you want to do something like this, set the form’s action="javascript:;", then update it in your jQuery to the actual value right before submitting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ALL, I have a following code: In .h file: struct Foo { int ma;
I have a text area in my form which accepts all possible characters from
All- I have the following code: class AddStringTask extends AsyncTask<Void, String, Void> { @Override
all three footers have the same html and css code but actiing differently in
All, I have a stored procedure on SQL Server 2005 that accepts an XML
All, I have created a plugin that I will be using across several projects.
All, I have the following query and it creates a result set as I
All , Say you have a code in a View like this. <img src='@Url.Action(GetCaptchaImg)'
All example AVR programs I've ever seen start with code such as the following:
All of the guides and tutorials that I have read tell me to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.