Gix075 / ajax-contact-form

An easy to use and hightly customizable Ajax Contact Form, including inputs validation and Google ReCaptcha.
MIT License
6 stars 1 forks source link

adding new field to formular: company #5

Open MaCXyLo opened 7 years ago

MaCXyLo commented 7 years ago

hey, i try to add a new field to the form.

ajaxContactForm.php

 $resultmsg = array();
 $company = "";

 ....

 // Company
 if($_REQUEST['acf_company']) {
     $company = trim(stripslashes ($_REQUEST['acf_company']));
 }

acf-demo.html

 !-- Field: Company -->
                          <div class="form-group">
                              <label for="acf_company">Your Company</label>
                              <div class="form-input-error-msg alert alert-danger">
                                  <span class="glyphicon glyphicon-exclamation-sign"></span> This field is required
                              </div>
                            <input type="text" class="form-control validate" id="acf_company" name="acf_company" placeholder="Your Company">
                         </div>

However, i get everytime an error if i want to send the formular. any ideas?

Kind Regards,

Gix075 commented 7 years ago

What kind of error you get? Your code seems to be correct. Let me know.