I have this same concern. I want users to be prompted if they've entered data / changed the form if they want to save their changes when they click any close button. Whether it's a button in the form or on InfoPath.
Also, I have a close button in my form with the "Close the Form" action running when it's clicked, and I have the checkbox saying "If changes have not been saved, prompt the user to save" ticked, however that prompt is not showing up when users click the close button.
Any Ideas? The ideal solution would be a simple close button in the form that does just that but prompts users to save if they've entered any data/changed any data on an opened form. And the same behavior if using the close button on Infopath.
Update: I had removed the ability to Submit the form under Tools > Submit Options and unchecked the "Allow users to submit this form" check box. To minimize confusion, we wanted a button labeled "save" in the form itself that would submit new forms to the SharePoint library as well as save over/update any changes to forms already in the library. When unchecking "allow users to submit the form" it removes the Prompt users if they want to save changes functionality even if the close button has the "If changes have not been saved, prompt the user to save" check box ticked in the "close the form" action.
This is just an update. It doesn't resolve the issue.