Discussion on Ultimate PHP, HTML5 & AJAX Contact Form (Bootstrap Edition)


jigowatt supports this item


47 comments found.


xng27 Purchased

Hi! Is it possible to define email recipient based on a dropdown list?

You can re-assign a value to $options[‘to_address’] after the $fdata assignment.

Try adding the following to line 130: $options[‘to_addresses’] = array( $fdata[‘ADD_FIELD_NAME’] );

be sure to change “ADD_FIELD_NAME” to match your field.

I was attempting to upload a PDF under 3MB and I have the cap set to 10MB this is set on the Cpanel as well. For some reason It gives me this error. Once I attempt to submit the form with the PDF.

ERROR I’M GETTING: There was an error with the file Application.pdf: 1 We don’t allow the file type for Application.pdf. The file upload failed for Application.pdf.

The Attachment Types are as follows (“Nothing Changed”) $options[‘attachment_types’] = array( ‘image/jpeg’, // Array of mime-types to allow in uploads ‘image/gif’, ‘image/png’, ‘application/msword’, ‘application/vnd.openxmlformats-officedocument.wordprocessingml.document’, ‘application/pdf’, ‘application/zip’ );

Hmmm.. it looks like you have the correct mime type set to me.

Have you contacted your hosting provider to ask if they’re allowing PDF files at all (just to rule them out)?

Do other file types on the allowed list work okay?

Have you tried uploading a different PDF to see if it’s an issue with that particular file?

I will contact my host to make sure they don’t block any specific type of files from being uploaded I will be back with you soon. Thanks!

It was fixed and works great thanks for the help! (:

my form is not working it give me message Hng on!Something went wrong here is my form url http://rootsschool.edu.pk/form/index.html

Hello. Having looked in the browser dev tools, I can see the following (I’ve removed personal information for your security):

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/rootssch/public_html/form/contact-form/process.php< on line 227

Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=<REMOVEDFORSECURITY>&response=<REMOVEDFORSECURITY>&remoteip=<REMOVEDFORSECURITY>): failed to open stream: no suitable wrapper could be found in /home/rootssch/public_html/form/contact-form/process.php on line 227

{errors &response=<REMOVEDFORSECURITY>&remoteip=<REMOVEDFORSECURITY>\”>reCaptcha response from Google<\/a> can’t be accessed by process.php Your hosting provider may be blocking cURL and/or file_get_contents() \u2013\u00a0please verify this with them. Please contact us<\/a> after you have spoken to your hosting provider”]}

This indicates that your hosting provider is blocking some server functionality which the script relies on (both the main method and it’s backup fallback).

We’d suggest changing hosting providers, but if this isn’t an option, then we can offer a refund on your purchase.

thanks for your quick response jigowat if i upload the form without captcha we don’t need it is this form work for us please help and quide me how to upload the form without captcha

Hi – you can just exclude the captcha from the HTML and the form will work without it.


klujan Purchased

Hi, would it be possible for you to show me or help me on what to change in the PHP form in order for me to receive submitted information to my email? I do have linked the form to my website and installed the recaptcha check box. I do not have knowledge of PHP so its confusing for me to know where to place my information.

Thank you for your help.

Hello. If you can supply us with FTP information, your email address and the website link via email to envato@jigowatt.co.uk then we’ll happily take a look for you :)

Hi, is it easy possible to add custom fields?


You should be able to just add them to the form & then the PHP will add all the fields in an $fdata variable which is then looped through to generate the email.


I would really like to see this form integrated into wordpress and have a admin panel that helps configure the settings in the back end and the subject message. Now I’m not talking about the creation of the fields I would like to go into the plugin and edit all the input fields my self but this would be awesome if you guys could make this same form but in wordpress. :)


At the moment we have no plans for this to be a WordPress plugin we’ll add it to the potential road map.

We do sell a simpler AJAX form for WordPress here: https://codecanyon.net/item/ajax-contact-forms-for-wordpress/129211 but it’s not supported anymore.

Another great form for WordPress would be Gravity Forms: gravityforms.com

Thanks, Jigowatt.

Hey you, i want to include a required radio button selection within two values. If you have a little snippet how to get it, it would be amazing ;)


I’m afraid we can’t add additional fields due to it being classed as custom work which isn’t covered by the Envato terms of support. But we can direct you to here: https://www.w3schools.com/html/html_forms.asp which does show you how to add radio buttons to a field.

The form itself accommodates for extra fields by loops through them all before sending an email.


Of course i figured out, how to implement radio buttons, but i dont´t get it as a required field…


In order to this you just need to add required to the element. You should see this on the existing fields.