PWNAGERobotics / ScoutingPASS

A FRC Competition Scouting Application
https://pwnagerobotics.github.io/ScoutingPASS/
62 stars 468 forks source link

Radio buttons not showing up in QR code #6

Open fuddster opened 2 years ago

fuddster commented 2 years ago

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.

fuddster commented 1 year 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.

zaaj commented 10 months ago

To test: does this bug still exist in the refactored getData function?

zaaj commented 10 months ago

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.

zaaj commented 10 months ago

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.