I am trying to clear out the previous value in a custom component in a form when the user navigates back to the page. I found the update handler in the documentation, however in practice it only triggers on the initial run of the step and never when navigating between steps of the form.
The documentation has no details about how to implement this handler either so it’s very difficult to understand if this is a bug or not.
I would say that you are correct, so thank you for reporting that our documentation covering the update(params?) handle is a little vague and needs to be more informative on this topic.
Could you please confirm if this issue occurs when clicking the back button of the browser, or the back button within the form itself?
We’re looking at this internally to check if this could be a general bug or something that we can correct/advice on your end.
I was able to figure out the issue. Update only runs when moving forward to the form. Say we have 3 forms (A, B, and C in that order) and form B has the update handler defined. Clicking the back link on form C, which sends the user back to form B will not trigger the update handler on form B. However, sending the user back to form A and then allowing the user to click next to go to form B, will trigger the update handler.
This behavior makes sense in the context of re-running calculations based on information provided earlier in the forms but wasn’t clear in the documentation.
Happy New Year!
Thank you for sharing this with the Community, glad to hear that you’ve found the solution for the issue. This was definitely useful information!