Describe the bug
I'm trying to use fill_form with a radio group but when I refresh the page, fill_form sets both radios to checked, which means one radio is always shown as checked on the form on refresh rather than preserving the user choice.
Then follow the instructions on the page to toggle "True", refresh, and see that the form state is changed to False and the selection wasn't preserved.
Expected behavior
On refresh, the radio selection should stay True
Environment Information
Please provide the following version information:
[x] I have provided a minimal reproducible example
[x] I have included the versions of fastlite, fastcore, and fasthtml
[x] I understand that this is a volunteer open source project with no commercial support.
Additional context
I submitted a PR to fix this by checking to see if the value key of the radio input equals the val we get from the form state that should fill in the radio group.
this is the failing MRE where refreshing the page sets the selection from True to False
Describe the bug I'm trying to use fill_form with a radio group but when I refresh the page, fill_form sets both radios to checked, which means one radio is always shown as checked on the form on refresh rather than preserving the user choice.
Minimal Reproducible Example https://gist.github.com/rbavery/449916770f18cbd769389ab8b467d62b
Then follow the instructions on the page to toggle "True", refresh, and see that the form state is changed to False and the selection wasn't preserved.
Expected behavior On refresh, the radio selection should stay True
Environment Information Please provide the following version information:
Confirmation Please confirm the following:
Additional context I submitted a PR to fix this by checking to see if the
value
key of the radio input equals theval
we get from the form state that should fill in the radio group.this is the failing MRE where refreshing the page sets the selection from True to False