Skip to main content

How to make a radio button unchecked by clicking it on Nintex forms?

I think it is only possible by javascript.


Hi Merildo,

In the Advanced Setting of your Radio Button, set Store Client ID in JavaScript variable to Yes and then enter an ID in Client ID JavaScript variable name. In this sample, it is MyRadioButtonID.

Here is the script you can put in a button

NWF$('document').ready(function(){

var strMyRadioButtonValue = NWF$('#'+MyRadioButtonID).find("input:checked").val();

NWF$('#'+MyRadioButtonID).find('input[value=''+strMyRadioButtonValue+'']').attr('checked', false);

});

Hope it helps

Christophe


Hi, Christopher

Thanks a lot for the response, but as I am at the basic level of Nintex

forms, please send me more details. This script should be put at "Button

Settings"? Into what field ?

PS: I had some problems on the internet and could not send this response

by the Nintex Community.

sds

Merildo

Em 05/02/2015 12:47, christopheraucq escreveu:

HOW TO MAKE A RADIO BUTTON UNCHECKED BY CLICKING IT ON NINTEX FORMS?

reply from Christophe Raucq in Learn More - View the full discussion


Hi,

 

Right click your button, select Settings

Expand the Validation section

Required: Select No

Expand the Advanced section

Store Client ID in Javascript Variable: Set to Yes

Client ID Javascript variable name, set the name of your Javascript Variable. In my case: MyRadioButtonID

 

Client click: Paste the following javascript code and replace MyRadioButtonID by the ID you have set for the Radio Button field.

NWF$('document').ready(function(){var strMyRadioButtonValue = NWF$('#'MyRadioButtonID).find("input:checked").val(); NWF$('#'MyRadioButtonID).find('inputuvalue=''strMyRadioButtonValue'']').attr('checked', false);});

 

Please note that you cannot test in Preview mode, you need to Publish.

 

Christophe


Hi, Christophe

Thanks for the clarifications.

sds

Merildo

Em 06/02/2015 05:57, christopheraucq escreveu:

HOW TO MAKE A RADIO BUTTON UNCHECKED BY CLICKING IT ON NINTEX FORMS?

reply from Christophe Raucq in Learn More - View the full discussion


 . . . Now I need to set a redio button to checked based on its value.


Please help me if you have a answer to the Question. I am also waiting for it. I need to set a redio button to checked based on its value.


Hi,

I received several answers but due to my lack of knowledge in javascript I

did not get the result I wanted

2017-07-28 12:08 GMT-03:00 prasadplvv <community@nintex.com>:

Nintex Community <https://community.nintex.com/?et=watches.email.thread>

Re: How to make a radio button unchecked by clicking it on Nintex forms?

reply from krishna pusarapu

<https://community.nintex.com/people/prasadplvv?et=watches.email.thread>

in Getting Started - View the full discussion

<https://community.nintex.com/message/67041-re-how-to-make-a-radio-button-unchecked-by-clicking-it-on-nintex-forms?commentID=67041&et=watches.email.thread#comment-67041>


Hello Christophe

Is there a similar solution for performing the same function for a Choice Control, that uses radio buttons to make the selection?

I have a Nintex 2013 Form where one of the controls is a Choice with 4 choices and no default values, using radio buttons for making single selections.

Use Case:

1) User selects one of the choices via a radio button

2) Then wants to unselect the choice without making another choice and continue making entries on the remainder of the form.

3) In order to unselect the choice without choosing another, the form editing must be "canceled" thereby undoing or preventing the other entries from being saved.

Thank you in advance for your assistance. 

Mark


Hi Mark,

So if I understanding it well, if the user decides to uncheck the radio button, the form needs to be canceled right away?

Regards,


Christophe

Thank you for your prompt reply.  No, I may not have been clear.  I'm was only stating that in order to uncheck or "unselect" their choice, that the editing of the form would need to be canceled.  Imagine a scenario where a user is filling out a form, entering values in a variety of fields, some dates, multi-line text, and a choice control where they can select one of 4 choices.  They complete the information, and need to save the data for later editing.  But they decide to change their selection on the choice control.  They want to unselect the value, and leave the choices all unselected while still saving the values in the other fields.  Then, at a later time, the user may come back to the item and eventually will need to make the choice selection.

I'm simply trying to allow for a previously selected "choice" in a radio button format, to be unselected after selecting it, without having to make another choice from the same control.

SP 2013 Column setting - Choice rendered as radio buttons

Nintex form - Choice control rendered as radio buttons

In my above example, I want the user to be able to "unselect" their choice and then move on to the next field.

Thank you for your assistance.

Mark


Mark,

What is not working in the solution I propose here above?

Add a button next to your choice list and add the javascript code to this button and follow carefully the instructions.

I do not see what I am missing here.

Regards,


Ok - I guess I understood that I could add another control, an actual "button" control that would have the "client click" parameter, and using your code, the user could then "clear" all choices in the choice control.  I was trying to save some real estate on a crowded form, and simply provide for the choice select button to be "unchecked." 

Thank you for taking time to respond and discuss. :)

Have a good day and weekend.

Mark


Replying to my own reply.  Rethinking . .  Is my assumption correct?  Can I actually clear the choice control selections using your code placed into another control?

In the Choice control that I'm trying to manage:

"Store Client ID in Javascript Variable: Set to Yes

Client ID Javascript variable name, set the name of your Javascript Variable. In my case: MyRadioButtonID"

and then in the newly created radio button control, in the Client Click parameter:

Client click: Paste the following javascript code and replace MyRadioButtonID by the ID you have set for the Radio Button field.

NWF$('document').ready(function(){var strMyRadioButtonValue = NWF$('#'MyRadioButtonID).find("input:checked").val(); NWF$('#'MyRadioButtonID).find('inputpvalue=''strMyRadioButtonValue'']').attr('checked', false);});

I think I should be taking a java class sometime.

Mark


Christophe

Sorry for all the back-and-forth - a bit tough having a discussion via messages.  I looked at what I thought your solution was leading me to, and I discovered that the only radio button type control, is as I've configured my form, using a Choice control with radio buttons.  I'm familiar with "buttons" which have a Client Click parameter, but they are not configurable as "radio buttons".  So, now I'm a bit muddled, as I seem to be in a loop back to your original solution.

I have tried to implement your solution, but as none of the controls I'm working with have a "client click" in which I can place the code, I'm stuck.  I'd like to make this happen, but I'm unable to see clearly to the answer,  If you could be a bit patient with me, I'd appreciate your additional insight.

Thanks

Mark


Can you not add this 'Uncheck' button next to your Choice Radio Button control? Surely a button has click event.


Ok - now I see we're looking at this the same way.  Yes, I could do that, but my original intent was to save space on the form and be a bit more elegant in the solution; ie simply unchecking the radio button.  I'll see what I can do with this.

Again, many thanks for looking at this with me.

Mark


Reply