question about this form5 snippet: https://gist.github.com/yayitswei/e23f79dbf966c946452428db4e6db410 sometimes pressing the reset button works, but sometimes it doesn't. am i doing this right? or is there a race condition somewhere?
You need to use a https://electric.hyperfiddle.net/tutorial/token_explainer.
Your https://gist.github.com/yayitswei/e23f79dbf966c946452428db4e6db410#file-minimal_editor_example-cljc-L19-L21 only runs once, on first button click. (pos? reset-counter) starts false and turns true on first button click, then stays true for subsequent button clicks. (reset! !form-data DEFAULT-VALUE) doesn’t rerun because neither !form-data nor DEFAULT-VALUE has changed.
thanks for interpreting my question and for the suggestion -- Token is just what i needed. will to try to more precise for future questions
it's not clear to me that he needs an out of band button with a manual Token, our forms demos bundle their buttons and don't have a userland token
I currently have the button outside of the form. I couldn't figure out how to use a Button! inside a Form! but probably a skill issue.
not a skill issue, the form bundles the button in our current structure
> I couldn’t figure out how to use a Button! inside a Form! but probably a skill issue.
I confirm this is not a skill issue. The API is not obvious, and we miss an example of custom Button! in forms.
i don't understand what you are trying to accomplish, please provide expected/actual behavior as well as the problem you are trying to solve
broadly, if you want a transactional form you should replicate one of the working demos exactly, forms are wip