Title: Adding to custom form
Last modified: August 21, 2016

---

# Adding to custom form

 *  Resolved [moggy17](https://wordpress.org/support/users/moggy17/)
 * (@moggy17)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-to-custom-form/)
 * HI
 * Im trying to add the authentication to a custom form
 * the verification code at the top is
 *     ```
       //INITIALIZE VARIABLES
           $name_error = '';
           $email_error = '';
           $subject_error = '';
           $message_error = '';
           //GET CUSTOM THEME OPTIONS
       	if (isset($_REQUEST['c_submitted']))
       	{
       		if($_REQUEST['c_submitted'])
       		{
       			$c_name = trim($_REQUEST['c_name']);
       			$c_email = trim($_REQUEST['c_email']);
       			$c_subject = trim($_REQUEST['c_subject']);
       			$c_message = trim($_REQUEST['c_message']);
   
       			//SEND EMAIL IF THERE ARE NO ERRORS
       			if($error != true)
       			{
       				$email_to =$queed_frontend_options['email_address'];
       				$message_body = "Name: $c_name \n\nEmail: $c_email \n\nComments: $c_message";
       				$headers = "From: ".get_bloginfo('title')."\r\n" .'Reply-To: ' . $c_email;
       				mail($email_to, $c_subject, $message_body, $headers);
       				$email_sent = true;
       			}
       		}
       	}
       ?>
       ```
   
 * I’ve put the question into the form which displays fine but i’m not sure what
   to do with the error checking bit I added it but it it still sent the form
 * any suggestions?
 * cheers
 * [http://wordpress.org/extend/plugins/captcha/](http://wordpress.org/extend/plugins/captcha/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [majestsick](https://wordpress.org/support/users/majestsick/)
 * (@majestsick)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849373)
 * I also need help doing this lol
 *  [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849396)
 * Hello moggy17,
 * You should add the functions of checking where the form validation runs.
 *     ```
       if( function_exists( 'cptch_check_custom_form' ) &&
       cptch_check_custom_form() !== true ) echo "Please complete the
       CAPTCHA."
       ```
   
 * or
 *     ```
       <?php if( function_exists(
       'cptch_check_custom_form' ) && cptch_check_custom_form() !==
       true ) echo "Please complete the CAPTCHA." ?>
       ```
   
 * We can help you with it, but this is a paid service.
    Is it ok for you?
 * Kind regards,
    Support Team
 *  [Haushaltsfee](https://wordpress.org/support/users/100pp/)
 * (@100pp)
 * [12 years ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849442)
 * Many people have the same question. Me, too.
 * Why can´t you explain, where exactly to put the code?
 * What does this mean?
 * “You should add the functions of checking where the form validation runs.”
 * Thanks,
    Karsten
 *  anonymized-13171256
 * (@anonymized-13171256)
 * [12 years ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849443)
 * Karsten,
 * To be fair, it’s not as simple as dropping in a few lines of code; it requires
   a certain amount of web development knowledge.
 * [Here’s a gist](https://gist.github.com/cdillon/31b4ccc4185dbd4b778b) to demonstrate
   adding Captcha to a custom form and checking the result. Look for “using Captcha
   plugin”.
 *  [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [12 years ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849444)
 * Hi 100pp,
 * “Why can´t you explain, where exactly to put the code?” – because there isn’t
   a standard way to write contact forms. Every developer creates a contact form
   the way they like. If you have the necessary coding skills you will understand
   where to insert the necessary lines. If no – it is better to consult a developer
   with the appropriate coding skills.
 * “What does this mean?” – it means that there is a fragment of code that is responsible
   for checking the data that come to the server via the form located on the site.
 * To Chris,
 * “Here’s a gist to demonstrate adding Captcha to a custom form and checking the
   result. Look for “using Captcha plugin”. – Thank you, this information may be
   rather useful.
 * Sincerely,
    BestWebSoft Support Team

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding to custom form’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/captcha_92b6c9.svg)
 * [Captcha](https://wordpress.org/plugins/captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/captcha/reviews/)

 * 5 replies
 * 5 participants
 * Last reply from: [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/adding-to-custom-form/#post-3849444)
 * Status: resolved