title: How to check if form is filled up in jquery?
body: <p>I have a form and a submit button and a modal. I want to run the modal to show a message if the form has an empty value.</p>
  
  <p>I tried .each to loop and check the form for empty inputs but even when the form is filled up it still returns as empty.</p>
  
  <p>My html form:</p>
  
  <pre><code>  &lt;form id="register_form" role="form" &gt;
      &lt;label &gt;First Name&lt;/label&gt;
      &lt;input id="inN"data-error="Enter first name." required&gt;
      &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;label&gt;Last Name&lt;/label&gt;
      &lt;input id="inL"  data-error="Enter last name." required&gt;
      &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
            &lt;label for="inputEmail" class="control-label"&gt;Email&lt;/label&gt;
            &lt;input type="email" class="form-control" id="inputEmail" data-error="Enter email." required&gt;
            &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is my javascript:</p>
  
  <pre><code>$('#register_form').each(function() {
              if ( $(this).val() === '' ){
                  console.log($(this).val()); // empty even when form is not
                  vm.message = 'One or Two fields are empty. Please fill up all fields'
                  document.getElementById("message").textContent=vm.message; // message on the modal
              };
  
  
          });
  </code></pre>