Open fuddster opened 2 years ago
Workaround for now - Always have a default value for Radio buttons. If there is a default then it will always be reset to the default value and that will be reported for the field.
To test: does this bug still exist in the refactored getData function?
As a test, I just ran through the form, using Inspect Element to clear the default value for the Floor Pick Up field (fpu) so no option was checked. At the QR code screen I used the Display Data button, and among the key=value; pairs I saw: ;fpu=;
So it appears that pull request #75 resolves this issue.
Just confirmed in TSV mode as well. I modified the text output to include a ; as well as a tab, since browsers consolidate whitespace in text output, and would not show consecutive tabs, and for the inspect-element-blanked radio button and its surrounding fields, I still got " 0; ; []" - two consecutive ;[tab] sequences, so I think it's safe to mark this bug resolved.
When a radio button does not have a default value and is not manually checked, its code will not show up in the QR code.
The code goes through each element and adds the code only if checked. It should probably add the code anyway and leave it blank if nothing is checked.
It also breaks the "clear form" function.