Bug 357743 - Radio buttons in a PDF form can not be deselected
Summary: Radio buttons in a PDF form can not be deselected
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.21.3
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-09 16:00 UTC by Harald Brennich
Modified: 2016-02-22 11:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
PDF document containing a form with radio buttons (78.39 KB, application/pdf)
2016-01-11 09:40 UTC, Harald Brennich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Brennich 2016-01-09 16:00:50 UTC
There are PDF forms that contain parts that should be modified only if necessary. When a user makes the error of selecting a radio button in that form, this selection can not be undone. 

Reproducible: Always

Steps to Reproduce:
1.Open a PDF form containing radio buttons
2.Click a button


Actual Results:  
The selected button is marked. The mark can be removed only by clicking another radio button of the button group.

Expected Results:  
It should be possible to deselect a radio button without selecting another button, for instance by toggling the selection

Although this is no bug, it can be really tedious for the user to fix an error (s)he has made: Go back to a version of the PDF document where the radio button not has been selected, and then enter all the data again...
Comment 1 Albert Astals Cid 2016-01-10 22:07:19 UTC
Please attach such a pdf
Comment 2 Harald Brennich 2016-01-11 09:40:13 UTC
Created attachment 96580 [details]
PDF document containing a form with radio buttons

There are several radio buttons in this document, for instance on line 14
Comment 3 Albert Astals Cid 2016-01-11 22:38:56 UTC
That's how it is supposed to work you to click Nein if you want to uncheck Ja and viceversa, no?
Comment 4 Harald Brennich 2016-01-12 08:30:15 UTC
Yes, normally when you have radio buttons you deselect one option by choosing another. 
But there are forms - as in the example I have given you - where a selection should only be made on a condition. If the condition is not met, no option should be selected. So there also is no preselected option in this part of the form.
Now if a user accidentally clicks an option, (s)he should be able to undo this. The user should be able to do so not only while editing the form, but even after storing the document and reediting it after discovering the error.
Mind, it is not primarily a bug of okular but an error the user made. However, it currently really  can be tedious to fix such errors, so it would be a great help if radio buttons could be unselected without selecting another one.
Comment 5 Albert Astals Cid 2016-01-12 23:25:54 UTC
I don't speak german, are you saying that for that form it is correct to have unchecked both Ja and Nein?
Comment 6 Harald Brennich 2016-01-13 08:25:07 UTC
That is precisely so. The form contains  groups of entries, some groups being mandatory and some being optional. For the optional groups, entries should be left blank - also the radio buttons, meaning no radio button should be checked/selected. If a user accidentally  clicks a radio button in such a group of entries, he should be able to undo this.
I think okular really does a great job in handing PDF forms. Being able to unselect radio buttons would make it even better.
Comment 7 Albert Astals Cid 2016-01-15 00:05:52 UTC
Git commit ab3a9072b097a9f3c92635aeb2e785f97078c72a by Albert Astals Cid.
Committed on 15/01/2016 at 00:05.
Pushed by aacid into branch 'Applications/15.12'.

Forms: Let checkboxes be unchecked

At least in PDF which is the only backend with form support

Radio buttons are a bit of a mess since they're supposedly also uncheckable if NoToggleToOff is not set but in Adobe Reader they never are

M  +14   -2    ui/formwidgets.cpp

http://commits.kde.org/okular/ab3a9072b097a9f3c92635aeb2e785f97078c72a
Comment 8 Albert Vaca Cintora 2016-02-22 11:58:51 UTC
Git commit aa2c28bc51b715433a6ad18fe08b748ba55d9a4c by Albert Vaca, on behalf of Albert Astals Cid.
Committed on 22/02/2016 at 10:54.
Pushed by albertvaka into branch 'frameworks'.

Forms: Let checkboxes be unchecked

At least in PDF which is the only backend with form support

Radio buttons are a bit of a mess since they're supposedly also uncheckable if NoToggleToOff is not set but in Adobe Reader they never are

M  +14   -2    ui/formwidgets.cpp

http://commits.kde.org/okular/aa2c28bc51b715433a6ad18fe08b748ba55d9a4c