onAfterSubmit Attribute

Microsoft Office InfoPath

onAfterSubmit Attribute

Specifies whether the form should be closed, kept open, or if a new form should be created after a successful submission.

Type

      xsd:NMTOKEN
    

Remarks

The onAfterSubmit attribute is an optional attribute of the submit element.

Values include "Close", "KeepOpen", and "OpenNew". The default value is "KeepOpen".

If the submit operation is not successful, then the onAfterSubmit attribute is ignored and the form is kept open.

Example

The following is an example of the onAfterSubmit attribute as it is used in the submit element:

    <xsf:submit
   caption="Su&amp;bmit"
   disableMenuItem="no"
   onAfterSubmit="KeepOpen"
   showStatusDialog="yes"
   showSignatureReminder="yes">
   <xsf:useScriptHandler/>
   <xsf:successMessage>Submit was successful.</xsf:successMessage>
   <xsf:errorMessage>Submit was not successful.</xsf:errorMessage>
</xsf:submit>