We have an application that at a certain point has a branch where the user can decide if they want to see page A or page B. Whichever one they pick, the other is hidden, but after the page they pick is filled out, both branches follow the same page path thereafter. On the page before submit, we call sfcInternal.av_html_clearHiddenData() to clear data from hidden page fields so that that data does not go into the submitted XML. After that is done, if the user uses the Nav bar to go back to the decision page and makes the other pick (for example, the first picked branch A and now go back and pick B), the defaults for the fields on the page do not show and the mandatory validations fire on all of the fields. How can I fix this so that the defaults show up on this page when it loads after the values have been cleared by sfcInternal.av_html_clearHiddenData() ? (By the way, we don't want to change Data Clearing Policy for the fields.)
We have our reasons for doing things the way we are doing them. Can anyone just answer my question as to how to make the defaults come back when the page loads? Is there a simpler way than to refill all of the defaults into each field explicitly using setRawValue() in a Business Rule and trigger it to fire when the current wizard page is shown?
The standard submission process of a composer form calls the clearHiddenData() function. Can I ask why you are calling it early?
The function is working as expected - all currently hidden data fields are being cleared. If this is not the desired behavior, then it is recommended that the call is made on the pre-submit event (as designed) or an alternate clearing script which explicitly clears only the desired fields be implemented.