<script type="text/javascript">

// This function listens for `return` and skips to the next field if not a textarea.

window.onkeypress = function(e) {
  
  if (e.which == 13) {

    var inputs = document.getElementsByClassName('form-control'); // Important, added by RackForms.

    for (var i = 0; i < inputs.length; i++) {
      
      if (document.activeElement.id == inputs[i].id && i+1 < inputs.length ) {
        
        if(document.activeElement.type != "textarea"){
          inputs[i+1].focus();
          e.preventDefault();
          break;   
        }

      }
    }
  }
}
</script>