Copy link to clipboard
Copied
Is it possible to deselect a choice in a radio button group on a fillable PDF? There are times a radio button choice may be selected accidentally. When this happens, the only choice one may have is to abandon the form they have been completing, and start from scratch in hopes the mistake is not made again. Our forms are very detailed and with multiple pages and combinations of drop downs, check boxes, radio buttons, text boxes, etc... with questions totaling well over 100. You can imagine someone's frustration if they've completed over 100 questions and near the end of the form there's a radio button question they did not mean to answer... The radio buttons are used exclusively for one choice selections only, otherwise check boxes are used. I'm interested in any simple solutions. Maybe Adobe can come up with a solution. I don't understand why radio buttons don't function the same way as check boxes. If you click once, it's marked; if you click again, it clear. Any help is greatly appreciated. Detailed steps for the fix are also appreciated. Thanks!
This is the functional definition of radio-buttons. Once a selection is made, you can only switch from one button to another, not de-select them entirely (unless you reset the form).
If you want to be able to de-select the buttons then you should use check-boxes. Give them the same name but different export values and they'll function just like radio-buttons (ie, when you click on button in a group the selected one becomes un-selected), with the additional feature that you could de-select a butto
...Tools - Forms - Preapare Form - More Options - Clear Form.
This is just what i was looking for thanks!!!!!!!!!!!!!!!!!! 🙂
Copy link to clipboard
Copied
In the case of ...
"There are times a radio button choice may be selected accidentally. When this happens, the only choice one may have is to abandon the form they have been completing...."
... then, the Edit / Undo action worked for me,
near the end of a long form, which I was about to abandon, after I searched for help, to no avail, and just before I clicked on "NO, do not save changes before closing " ...
Copy link to clipboard
Copied
This is actually a brilliant advice. Nice workaround!
Copy link to clipboard
Copied
So you accidentally clicked a button and saved your complete form. We found a work-around to deal with this. Basically what you do is add a button to the form under the same group-> go to the preview -> Select the new button -> Sacrifice that button with the selection in it by deleting it.
Copy link to clipboard
Copied
That's a very cumbersome way of solving this issue. You can just clear the form, or run this JavaScript code to clear this one field:
this.resetForm(["Radio1"]);
(replace "Radio1" with the actual field name, of course)
Copy link to clipboard
Copied
Edit->Clear Form.
Copy link to clipboard
Copied
An alternative to clearing the form is to combine the target group with another group, then split them apart.
Create a new radio group, change the name of the target group to the same name as the new group (the new group will now have 4 buttons). Then change the name of the target group back to the desired name. The radio buttons will be unchecked.
Copy link to clipboard
Copied
That is an incredibly convoluted solution to a problem that can be easily solved with a single line of code.
Copy link to clipboard
Copied
If you, as the form creator/owner, want to reset the form, you can just do it the way it's mentioned below (Tools - Forms - Preapare Form - More Options - Clear Form). BUT, if you want the end user to be able to deselect radio buttons or you just want a quick way to clear the form (or just specific fields) it is possible to add a button to your PDF to do just that.
Here's how to create & label the button:
Place the button form field on your form where you want it, give it a name and click the All Properties link. This opens the Button Properties dialog box. Click the Actions tab, then choose Reset a form in the Select Action from the drop down list. Next, click Add..., and select the fields you want to reset in the Reset a Form dialog box. Click OK. On the Options tab you can give the button a label. If you don't, the button will be blank and the end user won't know what it's for.
Copy link to clipboard
Copied
One way to do this is to toggle the option "button is checked by default" on/off.
Copy link to clipboard
Copied
If you want to modify the behavior of the radio button group such that the selected radio button can be unselected by clicking on it then here is one way to do it. For this example consider three radio buttons in the group and the radio button group's name is "RadioButton1". The following code should be added as a document-level script:
var rb = getField("RadioButton1");
rb.exportValues = [ "First", "Second", "Third" ];
var cval = "";
The following code should be added to every radio button that should be unselected:
if (cval==rb.value) {
rb.value = "";
cval = "";
} else {
cval = rb.value;
}
I have included an example PDF document with radio buttons that behave as you required.
Copy link to clipboard
Copied
Use check-boxes instead of radio-buttons.
Copy link to clipboard
Copied
This worked beautifully for one set of buttons, but when I tried to modify it for multiple sets, it no longer deselects. What happened?
Copy link to clipboard
Copied
All the answers here are frustrating. If you are on the user end and accidentally selected a "yes" or "no" where you want to leave the question unanswered there is absolutely nothing you can do. Clearing the form is fine if that's the ONLY change you made since opening it, but generally one does not want to have to go back and re-key the entire form just to fix one response. Even if you can crack open the form, editing those radio buttons isn't as straight forward as one might like. Massive time suck created by something that is supposed to make filling out a form easier than printing, completing by hand, and scanning.
Copy link to clipboard
Copied
You can create a clear button that resets ONLY the radio buttons OR you can use check boxes but set them up like a radio button. The latter option lets the user select only one choice but can deselect if desired.
Typical Radio buttons: Same Field Name; Different Option Export Values.
Typical Check boxes: Different Field Name; Same Option Export Value (e.g. Yes).
"Pseudo" Radio Buttons: Use Check boxes with Same Field Name; Different Option Export Values.
Copy link to clipboard
Copied
I realize this is an older issue, but there didn't seem to be a clear answer anywhere else. So instead of having to clear the entire form, you can go to Tools>Prepare Form (open the tool). Then select the button that is checked and delete it. Then copy/paste another identical radio button from the form into the right position and then rename.
There should be a way to change the field value of the button to change it back to being unchecked, but I was unable to make it work in the 15 min it took me to figure out I could just copy/paste an identical empty radio button into it's place after deleting it.
Copy link to clipboard
Copied
Editing the form to clear a radio button group is very inefficient--also, not everyone has the ability to edit the form.
You can easily make a button to clear JUST the radio group OR you can use pseudo radio buttons. See my post from Sep. 05, 2023.
Copy link to clipboard
Copied
+100 on the fact that this it's ridiculous to not have this ability. (And it would help if Adobe realized not all of us are InDesigners or coders.)
Copy link to clipboard
Copied
Using pseudo radio buttons is super easy and solves the problem of deselecting all choices.
Copy link to clipboard
Copied
I think the simplest way to correct this and reset all radio buttons back to empty is to prepare form -> click one of the radio buttons that already exists in the group, copy it, paste it, and then exit prepare form. Check that radio button and it will be selected. Then prepare form-> delete that one radio button. All are now empty!
Copy link to clipboard
Copied
That's probably the most difficult way of doing it...
Copy link to clipboard
Copied
I think you understand now what I meant... If not, see bebarth's code below.
Copy link to clipboard
Copied
Ctr+z works.
Copy link to clipboard
Copied
Only if used immediately. If you save the file, close it, and then re-open it, for example, it doesn't work.
Copy link to clipboard
Copied
Form is on the screen
Click on the menu, choose All tools - prepare form
On the form select (click and drag) the radio buttons you want to clear
Click on the 3 dots in the field pane (top right hand side)
Choose clear form