Search code examples
formsorbeon

Prevent clear button to wipe hidden fields


We use hidden fields to display initial information in the form. We explicitly do not want to use http requests. The form should contain all information after sending the form data via CRUD-API to the server.

The problem is that the clear button also clears the hidden fields and our initial information is wiped. I also tried to design my own process, but I was not able to make it work.

Is it possible to configure the clear button or designing a custom process to leave the hidden fields untouched?


Solution

  • It seems that what you are after, based on your comments, is to reload data that was previously saved in the database. This is what reloading the current webpage would achieve, and you can instruct the Clear button to do so by defining the following process:

    <property as="xs:string"  name="oxf.fr.detail.process.clear.*.*">
        navigate(uri = "javascript:window.location.reload(true)")
    </property>