I have built a theme in wordpress and it works ok but i cannot get twitter bootstrap validation to work, been stuck for a few weeks now.
heres functions.php folder:

enter code here

add_theme_support( ‘post-thumbnails’ ); //Adds thumbnails compatibility to the theme
// set_post_thumbnail_size( 250, 250 ); // 50 pixels wide by 50 pixels tall, resize mode

function dsm_portfolio_styles() {
wp_enqueue_style(‘bootstrap_css’, get_template_directory_uri() . ‘/vendor/bootstrap/css/bootstrap.min.css’);
wp_enqueue_style(‘style.css’, get_template_directory_uri() . ‘/style.css’);
}

add_action(‘wp_enqueue_scripts’, ‘dsm_portfolio_styles’);

function dsm_javascript_scripts() {
wp_enqueue_script(‘bootstrap_js’, get_template_directory_uri() . ‘/vendor/bootstrap/js/bootstrap.min.js’, array(‘jquery’), ”, true);

wp_enqueue_script('jqBootstrapValidation', get_template_directory_uri() . '/js/jqBootstrapValidation.js', array('jquery'), '', true );

wp_enqueue_script('contact_me', get_template_directory_uri() . '/js/contact_me.js', array('jquery'), '', true );

wp_enqueue_script('freelancer', get_template_directory_uri() . '/js/freelancer.min.js', array('jquery'), '', true );

wp_enqueue_script('scrollspy', get_template_directory_uri() . '/js/scrollspy.js', array('jquery'), '', true );

}

add_action(‘wp_enqueue_scripts’, ‘dsm_javascript_scripts’);

and form on index.php page:

<!-- Contact Section -->
  <section id="Contact">
    <div class="container">
      <div class="row">
        <div class="col-lg-12 text-center">
          <h2>Contact Me</h2>
          <hr class="star-primary">
        </div>
      </div>
      <div class="row">
      <div class="col-lg-8 col-lg-offset-2">
      <!-- To configure the contact form email address, go to mail/contact_me.php and update the email address in the PHP file on line 19. -->
      <!-- The form should work on most web servers, but if the form is not working you may need to configure your web server differently. -->
      <form name="sentMessage" id="contactForm" novalidate action="http://formspree.io/daniel@mobbzys.co.uk" method="POST" > 
      <div class="row control-group">
      <div class="form-group col-xs-12 floating-label-form-group controls">
      <label for="name">Name</label>
      <input name="name" type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name.">
      <p class="help-block text-danger"></p>
      </div>
      </div>
      <div class="row control-group">
      <div class="form-group col-xs-12 floating-label-form-group controls">
      <label for="email">Email Address</label>
      <input name="email" type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address.">
     <p class="help-block text-danger"></p>
     </div>
     </div>
     <div class="row control-group">
     <div class="form-group col-xs-12 floating-label-form-group controls">
     <label for="phone">Phone Number</label>
     <input name="phone" type="tel" class="form-control" placeholder="Phone Number" id="phone" required data-validation-required-message="Please enter your phone number.">
     <p class="help-block text-danger"></p>
     </div>
     </div>
     <div class="row control-group">
     <div class="form-group col-xs-12 floating-label-form-group controls">
     <label for="message">Message</label>
     <textarea name="message" rows="5" class="form-control" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea>
    <p class="help-block text-danger"></p>
    </div>
    </div>
    <br>
    <div id="success"></div>
    <div class="row">
    <div class="form-group col-xs-12">
    <button type="submit" class="btn btn-success btn-lg">Send</button>
    </div>
    </div>
    </form>
    </div>
    </div>
    </div>
    </section>

Read more here: Twitter Bootstrap validation not working in wordpress theme. Help!!! :)


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: