title: Submit form only when submit button clicked and prevent "Enter" submitting form
body: <p>I want to stop a user submitting a form upon clicking enter.</p>
  
  <p>This works for that</p>
  
  <pre><code>$(document).ready(function() {
          $(window).keydown(function(event){
              if(event.keyCode == 13) {
                  event.preventDefault();
                  return false;
              }
          });
      });
  </code></pre>
  
  <p>However I have other buttons on the page that when I tab to and click enter to avail of their functionality, this is blocked via this function.</p>
  
  <p>The button sits as so:</p>
  
  <pre><code>&lt;input type='button' tabindex="29" value='Add Additional Drug' id='addButton'&gt;
  </code></pre>
  
  <p>And I only want to submit the form when enter pressed while my submit button is selected.</p>
  
  <pre><code>&lt;input type="submit" name="submit" value="Submit" tabindex="40" class="submit"/&gt;
  </code></pre>
  
  <p>How would I do this?</p>
  
  <p>EDIT</p>
  
  <p>I see the answer in the attached Stackoverflow  but he allow people to press Enter if they have completed all the fields:</p>
  
  <p>I don't want a user to press Enter unless they have a button selected(i.e. Can't press Enter, tab to button, can press enter, which will trigger the button to do its functionality and not submit the form.</p>
  
  <p>The form works on a Tabbing basis, so a user will tab over all the fields.</p>