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


jigowatt supports this item


51 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.


N3RIU2 Purchased

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.



N3RIU2 Purchased

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.




We have someone who can’t upload a file to their own server (process.php)but they can edit index.php.

Is there a way to submit the form to the same page please?


I’m not fully understanding what you mean. But if you’re asking can the code in process.php be put inside the same file, yes it’s possible. But not under Envato support I’m afraid.


Hello, I have installed the contact form. I have the reCaptcha installed. I submit my form and I receive a success message, however I do not receive any messages or emails. What could I be doing wrong?

test page: http://creativcreature.com/contact-form.html

Hi. Your issue has been passed on to me – I’m the developer of the product.

The “from_address” in the settings is where the email sends “from your site”... so this would typically be “noreply@sitename.com”, or “sales@sitename.com” for example.

The “to_address” is where YOU receive the email enquiries (typically your own email address).

When you get the email, click on “reply” and the person who submitted the form should show up in the “to” address field in your email application.

This is done via the script setting a “reply to address” using the form data (email address the user submits): $mail->addReplyTo($fdata[‘email’]);

I hope that helps clarify the matter.

If I am honest it doesnt. I changed line 35 to my email address and I have not recieved any emails. This is the line of code I changed to my personal address and the form is not sending me anything.

$options[‘to_addresses’] = array( ‘you@email.com’ ); // To: addresse(s), add new array item for more


Please email envato @ jigowatt.co.uk with your FTP details and your desired to & from address and we’ll get this set up correctly.


Hello! Is there documentation around setting up a URL redirect on successful submission? Thanks!


We don’t have anything in the documentation on how to set this up.

On line 17 of process.php you should be able to see the redirection option setting.


Hi, I am wondering about the information in the contact-form/process.php file. At the top there is a field for the secret ReCaptcha code from Google. Is this okay to be in this file, considering the file can be seen through a browser?

I am just wondering before I start to embed this form into a test page.

Also, can this form be used with just the html, the corresponding JS and PHP file included or does the PHPMailer folder need to be included as well for functionality?

Thanks for your time.

PHP code shouldn’t be showing in the browser – this usually means your server doesn’t have PHP installed or configured correctly.

You’ll need to use it as-is unless you have an experienced PHP developer handy.

Hope that helps :)