Forms do not refresh updated values across devices due to local storage caching

When the same form is accessed from multiple devices, updates made on one device are not reflected on another device if the form has already been loaded there. The first device appears to keep using values stored in browser local storage instead of retrieving the latest saved form values.

Steps to Reproduce:

  1. Open/start a form on User 1’s device.
  2. Open the same form on User 2’s device.
  3. Make changes to the form on User 2’s device and save/update it.
  4. Return to User 1’s device.
  5. Edit or reload the form.

Result:
User 1 does not see the changes made by User 2. The form continues to show the older values stored in local storage.

Expected Result:
User 1 should see the latest saved form values, including changes made by User 2.

Additional Information:
On User 1’s device, the form values appear to be stored in browser local storage. This prevents the device from loading the latest values after another user has updated the form. Clearing local storage and reloading the page causes the latest values to display correctly. Below are some screenshots showing the issue.

Local storage:

Form view:

List view (actual data - green shows value not displaying on form):

Hello Matt!

What you are describing is actually expected behaviour. We don't want users to lose data by accidentally refreshing or closing the form tab, so we load back the intermediate state from local storage.

Note that this does not happen when we know that a user is done with the form. If they save it or use the close button, next time the form will load the latest data available.

But, for cases when saving the intermediate state is not ideal, you can use fd.clearStorage() method like so:

fd.spBeforeRender(() => {
    fd.clearStorage();    
});

This will clear the local storage values responsible for saved state before the form fully loads.