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

jigowatt

jigowatt supports this item

Supported

32 comments found.

Hi, I would like to seek your help on error messages.

If people miss one compulsory field, the error message will appear. The error message is extracted from the field name, e.g. we need your “name” as there is a field called “name”. As the webpage I am doing is a bilingual webpage (English and Chinese), there seems no problem with English version. However, in Chinese version, the message shows the error message with the English field name. Could I ask whether the error message could be customized instead of using the field name. e.g We need your “chinese word”.

I tried this in process.php as follows, but it did not work:

array_push($errors, parseMessage($translations->form->error->required->$lang, test));

Thank you.

Hi.

You should be able to set the “name” attribute in the HTML to the Chinese word for the translation?

If you’re using the same field for both languages, then you may need to us PHP to conditionally set the name attribute based on which language the user is browsing, but this is outside of the scope of our support I’m afraid, and will depend entirely on how you’ve got the rest of your site in both languages.

Instead of using the “name” attribute as variable (i.e name=”’attachment[]”), how to customize the error message. e.g We need your photo

Hi. you should be able to use PHP in the form field to give it a different name depending on a language variable you have in your script.
… name="<?php ($lang == 'english') ? 'en_field' : 'cn_field' ; ?>"…

It’s easier to do it there than to do it via process.php

We don’t know how you’re distinguishing between languages currently, and this sort of customisation is out of the terms of support I’m afraid.

Hi,

I would like to change the size of the button to btn-md. I’ve changed the index page and contact.js as follows:

<button type=”submit” class=”btn btn-md btn-primary”> SEND</button>

function resetFormButton ($submit, submit_text) { jQuery(’<button style=”margin-left:5px;” class=”btn btn-md btn-success”>

The SEND button has changed but the RESET button is still lg size. Please advise how to change the size of RESET button. Thanks.

What you’ve done should have done the trick… I’ve just tested locally and both buttons changed to the correct size.

Is your JavaScrips cached on the server or your browser? Try clearing caches and double checking the correct JavaScript is running.

Hope that helps.

Works great except for destroying the css styling of the page it goes on. Not too happy about that since I bought three licenses and know it will do the same thing to the other sites it will be going on.

Wonderful! I have paid for three licenses that will prove to be useless, and I will have to pay for three more? That is a drag.

if you’re happy to buy the three regular licenses on the above link, you can request a refund on the three you already paid for :)

It has been done, and you already approved the refunds. My compliments of a speedy and satisfying resolution. Your support is as good as your product. Thank you.

Im having difficulty connecting my form to my website.

Hello,

Ok I have just simplified everything to only what I downloaded from your server, I added the reCaptcha keys and made sure everything is connected and Im still getting an error…

I moved the form and contact files to this:

http://www.indians.org/new/contact-index.html

Do I have the right to use this form on this domain, can I use it on another domain or will I need to pay you for another license?

Hello, I spoke with my Hosting Provider, they made a few changes and then I got a different error code: Oh my! Your details failed to send: Could not instantiate mail function.

And now it has gone back to the original error message: The reCaptcha response from Google can’t be accessed by process.php Your hosting provider may be blocking cURL and/or file_get_contents() – please verify this with them.

I was hoping to use this form on several websites, if we can make it work and be dependable…

Can you please email FTP to envato @ jigowatt.co.uk and we’ll look into the CURL issue?

I am trying to use this with the free Oxygen Bootstrap template. I have your form customized and working fine in your sample page, but when I copy the code into the template, the contact form freezes when I try to send a message, stopping with very little progress. I suspect maybe a conflict between your JS and one of the scripts in the template. Can you advise if I give you the URL and FTP access?

Heya,

That’s a little out of the scope of support for the product, however, we’re intrigued, so on this occasion we will take a look.

Please note that this isn’t a promise of a fix, but we will take a look and see what we can do.

Can you provide a URL & FTP to envato @ jigowatt.co.uk.

Thanks.

Hello First of all, I really enjoyed these forms,they are very useful! How can i clear the forms after they are submitted?

Hi. There should be a button which appears after the form is submitted – this allows you to clear the form.

If you require it to be done after a successful submission and not a second button click, then the javascript will need to be altered.

Hope that helps.

I have sent you FTP details on your request some weeks ago, but still no answer! Please check out my problems with this script.

We have replied via email, apologies again for the delay.

Hi,

After installing the form on site without changing much except Google recaptcha key, I am getting an error http://onexdmcc.com/newform/

Please guide how to fix it. Also tell me if I need to put following code in my form as advised by Google recaptch

<button class=”g-recaptcha” data-sitekey=”6Ldf8RoUAAAAAIU52G_9YjRhpuZvZ1jqprVRORdt” data-callback=”YourOnSubmitFn”> Submit </button>

Sorry it worked, I was missing a setting. Please delete this comment as it has secret key. Also consider adding a setup guide which is missing from your zip.

Please tell me how to change success messages.

Heya,

You should be able to find the text to edit in the translations.json file.

Thanks.

How do I make the google recaptcha responsive I notice it does not fix its self when the website responds.

Hi… unfortunately, this is down to google’s code. The only thing you can do is add a media query and set the “scale” via CSS… The latest version of the product should include some CSS to resolve this, but in case it’s not present, stick the following in the <head> of the page: Add a comment to this line transform-origin:0 0; -webkit-transform-origin:0 0; } } </style>

<style>
    /* Make recapture responsive (fit on small screens) */
    @media screen and (max-height: 575px) and (max-width: 335px){
        #rc-imageselect, .g-recaptcha {
            transform:scale(0.77);
            -webkit-transform:scale(0.77);
sorry… the envato comment got messed up… See here: https://pastebin.com/PJNrX9UP

Is this for static sites? Or just for Wordpress?

Heya,

This is specifically for static sites, not for WordPress.

Thanks.

Hi,

The AJAX does not seem to be working after implementing the code. When I submit I get a white page with plain text response. Rather than the actual Bootstrap panel.

Hi there… we just visited the page you linked to, and the form appeared to submit okay… did you get it fixed?

Hi, sorry about that I have been doing lots of tests and at the moment the form is not using your code. It is a stripped back ajax form. I was running a `.slim` version of jQuery which does not include the `$.ajax` function. I will be trying to implement your form later today. Sorry for the confusion.

by
by
by
by
by
by