Search code examples
popupwindoworbeon

Disable 'Leave site?' popup when close Orbeon Form window


We have some Orbeon forms and do not want Orbeon to save our Control Values because we send those in a POST method as xml. We replaced 'then save' line with 'then send' line in the properties-local.xml file. But when we click on Submit button (and get xml successfully) and we close Orbeon window, a 'Leave site? Changes you made may not be saved.' popup appears. Is there a way to disable this popup?

The related part of our properties-local.xml:

<property as="xs:string" name="oxf.fr.detail.process.submit.myappname.*">
    require-uploads
    then validate-all
    then send(uri="http://myuri", method="POST", content="xml")
    then new-to-edit
    then success-message("save-success")
    recover error-message("database-error")
</property>

Solution

  • In your process, before the line that starts with recover, add:

    set-data-status(status = "safe")
    

    For on this action, see its documentation.