title: Bootstrap Validator Form message to load on the same page
body: <p>I've been looking to solve this, but i can't find a way to do it. I already tried other methods i found in here, but none of them were working for me.</p>
  
  <p>I'm building a website with Bootstrap and also using Bootstrap Validator to make a Contact Form. I can make it work perfect and also submit the contact, but the "thank you message" is redirected to another page. I want the "Thank you message" to load on the same page, and take the place of the form, since its a one scrolling page website.</p>
  
  <p>Can anyone help me please? This is the code i have so far:
  Ps.: All my CSS file are the original from bootstrap, nothing has been changed.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;!-- form: --&gt;
              &lt;section&gt;
                  &lt;div class="col-lg-8 col-lg-offset-2"&gt;
                      &lt;div class="page-header"&gt;
                          &lt;h2&gt;Formulário de contato.&lt;/h2&gt;
                      &lt;/div&gt;
  
                      &lt;form id="defaultForm" method="post" class="form-horizontal" action="contact-2.php"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label"&gt;Nome completo&lt;/label&gt;
                              &lt;div class="col-lg-4"&gt;
                                  &lt;input type="text" class="form-control" name="firstName" placeholder="Nome" /&gt;
                              &lt;/div&gt;
                              &lt;div class="col-lg-4"&gt;
                                  &lt;input type="text" class="form-control" name="lastName" placeholder="Sobrenome" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label"&gt;Assunto&lt;/label&gt;
                              &lt;div class="col-lg-5"&gt;
                                  &lt;input type="text" class="form-control" name="subject" placeholder="WebSite" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label"&gt;E-mail&lt;/label&gt;
                              &lt;div class="col-lg-5"&gt;
                                  &lt;input type="text" class="form-control" name="email" placeholder="email@contato.com" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label"&gt;Telefone&lt;/label&gt;
                              &lt;div class="col-lg-5"&gt;
                                  &lt;input type="tel" class="form-control" name="tel" placeholder="48 0000 0000" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label"&gt;Mensagem&lt;/label&gt;
                              &lt;div class="col-lg-5"&gt;
                                  &lt;textarea class="form-control" name="message" rows="10" placeholder="Escreva aqui sua mensagem."&gt;&lt;/textarea&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="col-lg-3 control-label" id="captchaOperation"&gt;&lt;/label&gt;
                              &lt;div class="col-lg-2"&gt;
                                  &lt;input type="text" class="form-control" name="captcha" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;div class="col-lg-9 col-lg-offset-3"&gt;
                                  &lt;button type="submit" class="btn btn-primary" name="signup" value="Sign up"&gt;Enviar&lt;/button&gt;
                                  &lt;button type="button" class="btn btn-info" id="resetBtn"&gt;Limpar&lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/section&gt;
              &lt;!-- :form --&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>PHP Contact</p>
  
  <pre><code>&lt;?php
  
  // getting 
  $firstname     = $_POST['firstname'];
  $lastname     = $_POST['lastname'];
  $email    = trim($_POST['email']);
  $emailtosend = 'myemail@hotmail.com'; //E-mail to receive message
  $tel           = $_POST['tel'];
  $subject          = $_POST['subject'];
  $message          = $_POST['message'];
  
  
  /* Message to show on email. */
  $mensagemHTML = '&lt;P&gt;Contact form sent by the website.&lt;/P&gt;
  &lt;p&gt;&lt;b&gt;First Name:&lt;/b&gt; '.$firstname.'
  &lt;p&gt;&lt;b&gt;Last Name:&lt;/b&gt; '.$lastname.'
  &lt;p&gt;&lt;b&gt;E-Mail:&lt;/b&gt; '.$email.'
  
  &lt;p&gt;&lt;b&gt;Telephone:&lt;/b&gt; '.$tel.'
  &lt;p&gt;&lt;b&gt;Subject:&lt;/b&gt; '.$subject.'
  &lt;p&gt;&lt;b&gt;Message:&lt;/b&gt; '.$message.'&lt;/p&gt;
  &lt;hr&gt;';
  
  
  // 
  // 
  $headers = "MIME-Version: 1.1\r\n";
  $headers .= "Content-type: text/html; charset=utf-8\r\n";
  $headers .= "From: $email\r\n"; // remetente
  $headers .= "Return-Path: $emailtosend \r\n"; // return-path
  $envio = mail($email, $subject, $mensagemHTML, $headers); 
  
   if($envio)
  //echo "&lt;script&gt;location.href='sucesso.html'&lt;/script&gt;"; // Página que será redirecionada
  
  ?&gt;
  </code></pre>
  
  <p>If there is anyone here able to help me with it, that would be great!</p>