Connect with us


Ajax Contact Form with attachments 2.0



Ajax Contact Form with Attachments and no spam control (drag and drop, reCaptcha, ayah)

The w2 Ajax Contact Form is a complete solution to create ajax contact form. Designed to be a flexible plugin, this item offer classics and originals features. You can easily create your own forms HTML templates and your own themes CSS.

minimum requirements:

  • PHP version 5.x (PHP5 or higher).

No Spam Control (Drag and Drop)

The drag’n’drop No Spam Control is an user friendly alternative to the traditionnal Captcha.
It is not a simple drag’n’drop feature to display the send Button. It is a complete solution for anti spam.

The No Spam Control controls the time between each submission (configurable max/min) and generate some hiddens fields with an encryption key (configurable) when the dragger is dropped. The hidden fields are generated with alphanumeric random and Time (encrypted via encryption key) to ensure that the No Spam Control fields are available only for a limited period (configurable).

This is a really safe and user friendly protection. Then it is easy to customise it with CSS.

There is 4 type for No Spam Control:

  • basic (simply drag’n’drop)
  • colors (drag’n’drop the right color)
  • numbers (drag’n’drop the right number)
  • shapes (drag’n’drop the right shape)

The plugin allows you to use other capctha solution like Google ReCaptcha or AYAH (are you a human).

PHP and JavaScript Librarys

  • This plugin uses some PHP Zend Components (Zend Mail, Zend Mime) for mailling features.

    The Zend Mail component is one of the most powerfull and professionnal mailling library. It allows you to deliver clean mail (encodage and attachments) for all mailbox type (desktop or mobile).
  • It uses classics jQuery plugins like jQuery Ui, jQuery Form, jQuery Validation. All themes (jQuery UI) and translation files for plugins are indluded in the package.

WordPress version available
Videos tutorials


  • Optimized for iDevices (responsive).
  • Multiple or single attachments files (you can easily disable this feature).
  • Multiple or single recipient (simultaneously or not).
  • Easy to configure (html, css, javascript, php).
  • Easy to add (or remove) your own fields.
  • Auto-responder feature (configurable).
  • Javascript and php validation.
  • Email message accepts HTML content (configurable).
  • You can use multiple instance of form in the same page.
  • PHP Script based on the open source Zend Framework Components Mail, Mime and Translate.
  • Drag and Drop feature (no spam control) have 4 differents models (view live preview).
  • Drag and Drop feature (no spam control) is ready for touch screen.
  • ReCaptcha integration.
  • ayah (Are You A Human) integration.
  • Full documentation (examples well documented).
  • JQuery plugin fully configurable:
    //Initialisation of the form
      noSpamControl: true,  //Specifie if No Spam Control is activate (true / false)
      noSpamControlType: 1,  //Spcifie the Type of No Spam Control (1 / 2)
      resetForm: true, //Spcifie if reset form after submit (true / false)
      reCaptchaPublicKey: null, //Specifie your reCaptcha PublicKey
      reCaptchaId: 'recaptcha', //Specifie an unqiue ID for HTML element where reCaptcha will be integrated (just specifie the ID do not create the element in the form)
      reCaptchaTheme: 'clean', //Specifie the reCaptcha theme you want to use
      reCaptchaLang: 'en', //Specifie the reCaptcha Lang you want to use
      reloadCaptcha: true, //Specifie if captcha is reloaded after submit (true / false)
      ayah: false, //Specifie if AYAH is activate (true / false)
      attachmentFile: true,  //Specifie if attachment file is activate (true / false)
      maxAttachments: 5, //Specifie the maximum number of attachments files
      showBtnSend: false, //Specifie if the btn send is visible when loading form when No Spam Control is activate (true / false)
      customFileInput: true, //Specifie if file input is custom skin (true / false)
      submitAlertType: 'slide', //Specifie the type of alert displaying for submit (dialog / slide)
      maxAttAlertType: 'slide', //Specifie the type of alert displaying for maximum attachments (dialog / slide)
      urlLoaderImg: 'css/w2_contact_form/images/ajax-loader.gif', //Specifie the url of the loader image
      nospamInfoHover: true //Specifie if nospam infos is displaying on mouseover (true / false)
  • PHP Class fully configurable:
      //creation of a new instance of Class Contact
      $contact = new W2ContactForm();
      //if you need to redefine some parameters (example: if you have several contact form in your web site)
      //Specifies the emails sender. If you don't specifie email sender the email used to send the mail will be the user mail (who submit the form)
      $contact->setMailSender('[email protected]');
      ///Specifies the emails recipients. You can specifies several emails for multiple recipient. If only one email is specifie the default email will be the first (index 1)
      $contact->setMailRecipient(array('1' => '[email protected]', '2' => '[email protected]'));
      //Specifies if you want to use auto responder feature  
      //Specifies if you want to use an email different that email sender to the auto responder
      $contact->setMailResponder('[email protected]');
      //Specifies the name of your web site
      $contact->setSiteName(array('name of web site'));
      //Specifies the required fields for the form validation.
      $contact->setRequiredFields(array('recipient', 'mail', 'subject', 'message'));
      //Specifies the fields for adding them in the mail body message - if you don't specifie field all the fields will be automatically added to the mail body message
      $contact->setBodyMessageFields('<p>E-mail: [mail]</p><p>Version: [version]</p><p>Phone: [phone]</p><p>Date of Birth: [datebirth]</p><p>Country: [country]</p><p>Web site: [website]</p><p>Message: [message]</p>');
      //Specifies the subject of the email if you don't use subject field in your form
      $contact->setMailSubject = 'subject of the message';
      //Specifies the fields need HTML encodage (example: textarea)
      //Specifies if HTML tags is accepted in the email message (for the textarea form element)
      //Specifies if the HTML form is encoded in utf_8
      //Specifies the folder for uploads attachments files in your server
      //Specifies the max file size for the attachments files (in octet)
      //Specifies the maximum number for attachments files
      //Specifies the accepted extensions (.jpg, .png, .pdf ...) for the attachments files
      $contact->setExtFileOk(array('pdf', 'doc', 'docx', 'jpeg', 'jpg', 'png', 'gif'));
      //Specifies if you want to delete files uploaded after email sending
      //Specifies the minimum and the maximum time between submission of the form (in seconds)
      $contact->setAntiSpamTimeControl(array('min' => '5', 'max' => '3600'));
      //Specifies if you want the script configure the CHMOD for "uploads" folder
      //Specifies if you want to use no spam control (drag and drop)
      //Specifies if you want to use recaptcha for validation form
      //Specifies if you want to use AYAH for validation form
      //internationnalization with simple .tmx file (laguages/w2_cf_notifications.tmx)
      //Sending email     
  • Easy to internationalize (just use the translated files or create your own):
    for PHP.

Technical Support

For a quick response send me a private message via my profile.
web agency

enjoy !


  • version 2.0.7:

    • Added HTML5 multiple File field support.
    • Fixed PHP7 error.
  • version 2.0.6:

    • Added timestamp, user IP and URL referer at the footer of the mail message.
    • Added new Google recaptcha.
    • Added xlsx entension for attachment file.
    • fixed attached file notification undefined.
  • version 2.0.5:

    • Fixed wrong auto responder sender name in mailbox.
  • version 2.0.4:

    • Added HTML5 data-attached-notification attribute to display text notification for attachment file button.
  • version 2.0.3:

    • Added feature to add “entry incomplete” notification for javascript validation.
    • Updated CSS themes.
    • Added feature to add field values in mail subject.
  • version 2.0.2:

    • Fixed bug for lang selection.
    • Updated CSS themes.
  • version 2.0.1:

    • Added feature to add cc or bcc recipient by using this synthax “bcc:[email protected]”.
    • Updated CSS grid layout to center the grid elements.
  • version 2.0:

    • Added Ui tootlip support.
    • Added form multi page support
    • Added CSS grid layout to create complex form template responsive.
    • Added HTML5 data-rule validation.
    • Added new jQuery plugin paramater for success submit ( hideFormAfterSubmit, redirectTo, delayRedirect ).
    • Removed inline HTML template ( use grid layout instead )
  • version 1.2.1:

    • Added missing Zend Validate library files for sending mail via smtp.
  • version 1.2.0:

    • Updated the translation process to replace .tmx file by .php files.The goal is to minify the package by removing the Zend translate component.
    • Added new methods to specify the auto-responder message and subject or all PHP notification messages without editing the translation files.
    • Added new responsive CSS rules for nospam message box
  • version 1.1.18:

    • Updated CSS files to center fields elements.
  • version 1.1.17:

    • Added a new method to send email to all recipients automatically (without using hidden fields).
  • version 1.1.16:

    • Added translation files for datepicker widget
  • version 1.1.15:

    • Added CSS transition for IE 10
  • version 1.1.14:

    • Fix bug for placeholder on IE9.
  • version 1.1.13:

    • New method to only upload files (not send them as attachment).
  • version 1.1.12:

    • New feature to add attachment files to the auto-responder message.
  • version 1.1.11:

    • Add loader for nospam control to display button “send” only when nospam hidden fields are completely loaded (usefull for slow server connexion).
  • version 1.1.10:

    • Fix CSS bug for custom file input in IE10.
  • version 1.1.9:

    • Adding new laguage (Portuguese).
  • version 1.1.8:

    • Possibility to add fields value in the auto-responder message (just use shortcode [field_name] in the content of the mail responder message).
    • New HTML form template with HTML5 attribute placeholder.
  • version 1.1.7:

    • upgraded the PHP AYAH library to fix error
  • version 1.1.6:

    • Progress bar for attachment file upload
    • Fix error for jquery 1.9 ($.browser).
    • Adding the HTML attributes enctype=”multipart/form-data” for form element in examples.
  • version 1.1.5:

    • CSS transition now available for browser Chrome, Safari and Opera.
  • version 1.1.4:
    • Automatic reloading of AYAH after form submission.
    • Fix CSS bug for button send color with CSS theme hot-sneaks.
  • version 1.1.3:
    • Fix PHP 5.4 error for $_FILES.
    • Fix CSS bug for UI button set on Chrome.
    • Jquery UI 1.9.2 included in download package (if you need to use it).
    • Body mail message display breakline (for Textarea fields value).
  • version 1.1.2:
    • Fix bug for checkbox fields width in Chrome.
    • You can add your own custom file field in your form.
  • version 1.1.1:
    • You can send your email via SMTP with authentification (example: gmail).
    • New method to create your own HTML template for the mail body message.
    • New javascript callback for submit success event. You can create your own javascript function for submit success event.
  • version 1.1.0:
    • You can send your email via SMTP.
    • Fix encodage bug for utf_8 content in the mail message to accept all type of character.
    • new CSS style (resizable) optimized for iDevices.
    • fix error message for missing language translation.
    • javascript callback function (beforeSubmit) to create your own specific rules of validation.
    • code source form editor (included in download package).
    • easy insatallation package (all files in one folder).
    • new CSS UI themes (for UI widget datepicker, buttonset …).
    • auto-responder feature.
    • easy translation method for PHP notifications messages (via .tmx file).
    • ayah (Are You A Human) integration.


Download Png Image

Subscribe Our   Youtube Channel


Free1 week ago

How you can Delete Albums on i phone

There are 2 different ways to delete albums on your iPhone. A technique is to sync your gadget with iTunes...

Free2 weeks ago

Avast Review — Pros and Cons of Avast Ant-virus

In this Avast review, we will look on the advantages and disadvantages on this antivirus software program. Fortunately, most users...

Free2 weeks ago

The Best Free VPNs

If you’re on a tight budget and don’t desire to use a paid out service, there are many free VPNs...

Free3 weeks ago

How you can make a Collage on iPhone

If you’re wondering making a collage on your i phone, this article will present to you how to do it....

Free3 weeks ago

Netfiles Dataroom Assessment – If you decide to Read a Netfiles Dataroom Review?

When you are taking into consideration which dataroom software application to work with, you might be wanting to know which...

Free3 weeks ago

The Online Dating Disease

A recent review suggests a rise in cases of sexually transmitted ailments due to internet dating. The Centers for Disease...

Free3 weeks ago

Who Else Wants to Do My Essay For Cheap?

If you’re struggling with college work and looking for someone to write my essay, then you’re all on your own....

Free3 weeks ago

Poetry Analysis Of “introduction To Poetry” Free Essay Example

Homework Lab doesn’t bear any responsibility for the unauthorized submission of the examples. First, you would wish to take a...

Free3 weeks ago

Totally free Antivirus Vs Paid Malware

While there are plenty of options for free antivirus applications on the market, these items usually come with limitations. Totally...

Free4 weeks ago

OnBoard Board Webpages Review

This On-ship Board Web destination Review can be described as comprehensive evaluate the benefits and drawbacks with this software. This...

Free1 month ago

Using Virtual Reality to Engage Special Demands Students

VR is mostly a new form of entertainment that allows users to immerse themselves in an encounter like zero other....

Free1 month ago

Antivirus Software Rewards

Antivirus computer software can help give protection to your computer against phishing scams and destructive software. Older adults are particularly...

Free1 month ago

Ideal Data Room Services

Best data room providers are a combination of functionality and ease of use. Some data room providers present features such...

Free1 month ago

On the web Security Guidelines

In an progressively connected world, web based security is of critical importance for everyone, right from individuals to businesses. We...

Free1 month ago

What you need to Know About Organization Process Motorisation Software

While you’re continue to deciding whether to use organization process motorisation software, there are a few things you should know...