Nintex Label Change on Radio Button Click

0.00 avg. rating (0% score) - 0 votes

Nintex products are wonderful and handy when you have to create & publish forms. There are bunch of options available using Rules that can be applied too. In case the requirement is more than that, we can use jQuery stuff too. In one of the cases I have to provide a functionality whereby clicking a radio button, the label text should be changed. As such I do not find any out of the box solution for that in Nintex products. So I have to go with the jQuery stuff. Even with jQuery we have to take care of things a little. I have to do the following to achieve my target.

Control Settings

I have two controls to update for this setting. One radio button control & one label control. So I have changed property of radio button control to have a javascript ID as below:

controlsettings

 

After doing this update, I have to provide the javascript ID for the label. Here instead of giving the javascript ID to the label, instead I have created my own client ID along with script, making it easy and flexible for me as shown below:

labelsettings

Custom jQuery

After doing all the above things I have to write down the custom jQuery code. I need to first get the radio button value & then change the label text. The code is below:

customjs

As you can see the radio button need to be fetched by using _0 and _1 at the end. So if you have more radio buttons it will be like _2 _3 _4 or something like that. The above code executes on the radio button click. When radio button will be clicked the label gets changed accordingly.

0.00 avg. rating (0% score) - 0 votes

W@rfi

Owner of this blog site. Have expertise on Microsoft technologies.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *