title: form not flagging errors on eachstep & running php code when submitted
body: <p>when all fields are correctit gives msg all good but doesn't run thephp code associated with isset also how do i get it to flag errors when next btn is clicked before displaying the next step/form</p>
  
  <pre><code> &lt;div class="idealsteps-container"&gt;
  &lt;nav class="idealsteps-nav"&gt;&lt;/nav&gt;
  &lt;form class="idealforms" novalidate autocomplete="off" action="/" method="post"&gt;
  
  &lt;div class="idealsteps-wrap"&gt; 
  
  &lt;!-- Step 1 --&gt;
  
  &lt;section class="idealsteps-step"&gt;
  &lt;div class="field"&gt;
  &lt;label class="main"&gt;Book Name:&lt;/label&gt;
  &lt;input name="bookname" type="text" &gt;
  &lt;span class="error"&gt;&lt;/span&gt; &lt;/div&gt;
  
  &lt;div class="field buttons"&gt;
  &lt;label class="main"&gt;&amp;nbsp;&lt;/label&gt;
  &lt;button type="button" class="next"&gt;Next &amp;raquo;&lt;/button&gt;
  &lt;/div&gt;
  &lt;/section&gt;
  
  &lt;!-- Step 2--&gt;
  
  &lt;section class="idealsteps-step"&gt;
  &lt;div class="field"&gt;
  &lt;label class="main"&gt;code:&lt;/label&gt;
  &lt;input name="code" type="text"&gt;
  &lt;span class="error"&gt;&lt;/span&gt; &lt;/div&gt;
  
  &lt;div class="field buttons"&gt;
  &lt;label class="main"&gt;&amp;nbsp;&lt;/label&gt;
  &lt;button type="button" class="prev"&gt;&amp;laquo; Prev&lt;/button&gt;
  &lt;button type="submit" id="btn" name="btn" class="submit"&gt;Submit&lt;/button&gt;
  &lt;/div&gt;
  &lt;/section&gt;
  &lt;/div&gt;
  &lt;span id="invalid"&gt;&lt;/span&gt;
  &lt;/form&gt;
  &lt;?php
  if(isset($_POST['btn']))
  {
  echo "submitted";
  }
  ?&gt;
  &lt;script&gt;
  $('form.idealforms').idealforms({
  
  silentLoad: false,
  
  rules: {
  'bookname': 'required bookname'
  },
  
  onSubmit: function(invalid, e) {
  e.preventDefault();
  $('#invalid')
  .show()
  .toggleClass('valid', ! invalid)
  .text(invalid ? (invalid +' invalid fields') : 'All good!');
  
  }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>currently it flags errors only when the submit btn in step2 is clicked,how do i get it to show errors of tht step before proceeding to next step also to run the php code when final submit btn is clicked</p>