Giter Club home page Giter Club logo

bootstrap3-contact-form's People

Contributors

georgewl avatar jonmbake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap3-contact-form's Issues

Small edit to work with smtp.yandex

Hello!
In their web projects I'm using as SMTP to send mail - mail from Yandex. https://yandex.com/support/mail/mail-clients.xml
But there is little restriction, Yandex sends mail only if the mail sender coincides with the mail account has been authorized on the server smtp.yandex.com .
The mail is sent successfully only if the email address of the sender in a contact form (Email Address *) will match the email address of the account to which distribution is authorized on the server ($mail->Username) SMTP yandex.
https://hsto.org/files/1c3/236/f61/1c3236f61ff347aaa736f0178cf37bc6.png

If the contact email of the sender does not match the email through which the sending SMTP server, emails are not sent.
An error occurs:
https://hsto.org/files/97b/73c/8d0/97b73c8d09884118b78c9117b7cb8196.png
https://hsto.org/files/f5c/d85/62f/f5cd8562f8ca4ab68a3f16f5be9538b6.png

As I understand it, this is to prevent spamming attempts.

How can I solve this issue? In the email from the contact form in the "sender" field was added the same email via SMTP which is sending letters.

By the way, on their WordPress sites to send through SMTP I use a plugin https://ru.wordpress.org/plugins/wp-mail-bank/ , through his perfect sent emails with smtp yandex, as this plugin automatically sets the email message's sender to the email which are sent out via SMTP.

I hope it is clear explained. Sorry for my English, I use auto-translator.

Attachment

How about to add support of attachments ?

Compatibility/security: Replace file_get_contents with cURL function

Many web servers now force allow_url_fopen=0 and allow_url_include = 0 due to security concerns and this creates an incompatibility with the form (PHP warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in) when accessing the Google Captcha URL.

Phone number validation

Hi,

Is it possible to remove the validation from the phone number form. I would still like the phone number field, but ive found issues using iOS browsers.

Cheers

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

logs in console Google Chrome

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
POST ...library/sendmail.php 500 (Internal Server Error)
send @ jquery.min.js:6
x.extend.ajax @ jquery.min.js:6
(anonymous function) @ contact-form.js:69
x.event.dispatch @ jquery.min.js:5
v.handle @ jquery.min.js:5

error
An expected error occured while attempting to send the email: SMTP Error: data not accepted.
what to do?

Error

Jon,
Thanks for your efforts. I'm a real beginner so js is a mystery.

The form is working sort of: I receive test emails sent from the form but the contact form page never finishes sending. Console info:
Firefox console:
SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1
Error: http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js is being assigned a //# sourceMappingURL, but already has one
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery.min.js:5
TypeError: response.responseJSON is undefined contact-form.js:46

Chrome:
Failed to load resource: the server responded with a status of 504 (Gateway Time-out) http://partnersinbpc.com/library/sendmail.php
Uncaught TypeError: Cannot read property 'message' of undefined contact-form.js:46

Any suggestions appreciated!

ELI5 Configuration?

I apologize if I should've known this already, but I haven't really ventured much outside of HTML and CSS.

In an attempt to set up this for someone I made an easy website for a while ago, I can't figure out what to configure sendmail.php. I am not using Environment Variables.

//attempt to send email
  $messageBody = constructMessageBody();
  require './vender/php_mailer/PHPMailerAutoload.php';
  $mail = new PHPMailer;
  $mail->CharSet = 'UTF-8';
  $mail->isSMTP();
  $mail->Host = "smtp.gmail.com";
  $mail->SMTPAuth = true;
  $mail->Username = "[email protected]";
  $mail->Password = "my!password";

  $mail->SMTPSecure = 'tls';
  $mail->Port = 587;

  $mail->setFrom($_POST['email'], $_POST['name']);
  $mail->addAddress("[email protected]");
  $mail->Subject = $_POST['reason'];
  $mail->Body  = $messageBody;

What exactly do I put into "Host", "Username", "Password" and "addAddress"? This is out of my comfort zone to say the least.

error: reCAPTCHA checked failed!

Hello, I keep receiving this message even though I am allowed to submit the form and reCAPTCHA gives me the OK to do so:
reCAPTCHA checked failed!

Applying to a pre-existing form?

Sorry, If I'm asking in the wrong place, I've built a pre-existing form when I came across this.

Which elements are absolutely necessary, as the form uses the built in validators of Bootstrap.js rather than "help-block"

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="name">
                                        Name
                                        <span class="text-danger">
                                            *
                                        </span>
                                    </label>
                                    <input type="text" class="form-control" id="name" placeholder="Enter name" required="required" />
                                </div>
                                <div class="form-group">
                                    <label for="email">
                                        Email Address
                                        <span class="text-danger">
                                            *
                                        </span>
                                    </label>
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope-o fa-2x">
                                            </i>
                                        </span>
                                        <input type="email" class="form-control" id="email" placeholder="Enter email" required="required" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="subject">
                                        Subject
                                        <span class="text-danger">
                                            *
                                        </span>
                                    </label>
                                    <select id="subject" name="subject" class="form-control" required="required">
                                        <option value="na" selected="">Choose One:</option>
                                        <option value="incorporation">Incorporation Enquiry</option>
                                        <option value="cosec">Company Secretarial Enquiry</option>
                                        <option value="restoration">Restoration/Dissolution Enquiry</option>
                                        <option value="product">Product Enquiry</option>
                                        <option value="property">Property Services Enquiry</option>
                                        <option value="general">General Customer Service</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="name">
                                        Message
                                        <span class="text-danger">
                                            *
                                        </span>
                                    </label>
                                    <textarea name="message" id="message" class="form-control" rows="9" cols="25" required="required"
                                    placeholder="Message">
                                </textarea>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <button type="submit" class="btn btn-lg btn-primary pull-right" id="btnContactUs">
                                Send Message
                            </button>
                        </div>
                    </div>
                </form>

Error on submitting form

When I click submit, I get the following error:

TypeError: 'undefined' is not an object (evaluating 'response.responseJSON.message')

Using Form in a Modal

Thanks for this wonderful contact form, Jon! :-)

I have the form working fine on a regular web page. However, I still can't get the form to work in a Bootstrap 4 modal after spending the better part of the last two days trying to find a solution. When attempting to submit the form when its displayed in a modal, everything works fine up to and including the reCaptcha, but then nothing happens upon clicking the send button. I'm learning, but at this point my knowledge of JS is rudimentary at best, so I haven't had any luck with troubleshooting the problem. Among the things I have tried is adding $("#myModal").on('shown.bs.modal', to the beginning of contact-form.js, but it made no difference. Any ideas on how I can make the form work in a modal?

Non required fields not added to email.

Non required fields not added to email. - I understand that is is modification of your script, but it would be good to support unrequited fields too. Currently unrequited fields do not get added to the email.

second mail user

Hi,

I have implemented your form in a website and all is working fine!

Would it be very difficult to let a second mail send to the user of the form!?

Can you please point me out how to do that?

Thanks! David

To email address

I've looked all through the code... where to you put the email address you want this form to send to? I'm assuming it will be sent to the same address that you set-up to send as on the mailserver?

POST is not allowed

Hi! Thanks for providing this helpful code. I got the recaptcha and everything else (I think) working, but when I click 'send' it gives an error (in red font with a pink background) below the form on the webpage that says

POST is not allowed

The javascript console says:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
http://127.0.0.1:62140/content/JeBf4dQBRMV_M_PMAAAG/4G4FdfW/S5Rsr7A/3nvbxFg/RRSwf1C/y5u4VNL/w61FBPP/xaTwicQ/library/sendmail.php

I'm testing this on my local machine. I have php installed on macOS BigSur.

I don't see anything obvious in the sendmail.php file that would return this error message. I'm hoping this is something obvious that I'm overlooking!

Please help - thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.