So if my application has a form and the user clicks on close instead of submit, I would like for the guide to end then. Is that possible?

Yes, it is most certainly possible:

  1. On the step where you are expecting the user to click submit,
  2. Create an invisible tip that would advance when the user clicks on the cancel button
  3. Add a branch to this new tip that would close the guide. The branch is activated as soon as the tip is 'complete' which in our case would be when the user clicks on the cancel button.