Add Cancel button to InfoPath form

When you look at the standard available options for buttons in InfoPath (Submit, Update form and Rules and Custom code)  you would think that there’s also an Cancel option by default.
There is no Cancel button by default, you can however create this within two minutes.

  1. Drag a new button on the form and select it.
  2. Select in the menu bar the tab CONTROL TOOLS PROPERTIES.image
  3. Rename Button to Cancel in the field Label.
  4. Click  Add Rule, a menu is shown. Select When This Button is Clicked, a new menu appairs. Select and Click Close Form. image
  5. Confirm that you want the form to be closed by clicking OKimage

And that’s it. You’ve created your own Cancel button within 2 minutes.

3 thoughts on “Add Cancel button to InfoPath form

  1. Tatiana


    I have followed your instructions for my Infopath form and it works great, thanks!
    Only problem is, when I click Cancel, it sends me to the home page of the SharePoint site, whereas I’d like it to send me to the list view. Any idea on how to do this? (very very slowly and in detail; on most websites where I find explanations I am confused on the first step because I have no idea what people are talking about)
    I would appreciate your help.

    Thank you.

  2. Julie Britt

    FWIW, this may be as good as InfoPath gets when it comes to Cancel, but it’s a clunky solution. Closing a form should return users to the originating page, the expected action, not give them a page that says “The form has been closed”.

    1. Julie Britt

      I should have added that I have a page with the InfoPath web part to permit users to add a new item by clicking a link on the Home page. Clicking Cancel (or Close form) does not return Users to the Home page. Instead it goes to a blank form saying This form has been closed.

      I’m posting in case anyone else is attempting to do the same thing as me. InfoPath doesn’t have the tools to take you where you want to go with Cancel if you’re working with the form web part. If they had added a Close Form and go to…[link], that would have been the solution.

      Note: Working in SharePoint 365 online (browser forms) in Windows 10.


Leave a Reply

Your email address will not be published. Required fields are marked *