It may sound strange, but on form reset i want it to revert back to its original state, which was pre-populated with data from a DB query.
The other fields in the form (name, dates etc) all reset back to the value from the SC query that i have set with ‘Dynamic Attribute > Value’ but the checkbox which is set with ‘Dynamic Attribute > Checked’ resets to empty when i use the form reset button.
The value in the query does not change on form reset, just the population of checkbox. Is there something i can do to stop this?
I have tried reloading the SC action/query after form reset using ‘on-click’ rather than a ‘reset’ button type, but this hasn’t worked.
So this didn’t work (I used session storage but i can’t imagine it would be any different).
The variable in session storage remained with the same value, but using form reset still unchecked the checkbox regardless of what value the dynamic attribute for checked was returning.
Yes I had the same issue recently with a form inside of a modal. The quickest way I fixed this was to reload the page on the sever action success. Not ideal but did the job for me.
The other fields in the form are populated dynamically by the exact same DB query, and when you reset the form the keep what ever data is coming from the query, its just the checkbox that reverts to unchecked regardless of what is in the DB query.