Skip to main content
Nintex Community Menu Bar

Hide a radio button choice through javascript/css

  • July 10, 2018
  • 5 replies
  • 43 views

Forum|alt.badge.img+6

Good day!

So I am trying to hide one choice since I am using a task process. This is the one I am using right now, but it seems to hide other rows on options of the controls as well, so it is an annoying workaround.

tr:nth-of-type(3){
display:none !important;
}

Any other way to hide task outcome choices specifically?

5 replies

Forum|alt.badge.img+14
  • Scholar
  • July 18, 2018

that's too general selector, it applies for each 3rd row in each (html) table on the form

try with a selector like follows

.MyChoice table.nf-choice-radio tr:nth-of-type(3) {
    display: none !important;
}

Forum|alt.badge.img+6

I am trying to do this with the Outcome for the task process (nintex form).

I added the .task-outcome to the control css class (right?)

.task-outcome table.nf-choice-radio tr:nth-of-type(3){ 
display:none !important;
} ‍‍‍

It is not working though.

EDIT:

It is now working with this code

.task-outcome tr:nth-of-type(3){ 
display:none !important;
}

Thanks a lot. Marian Hatala


Forum|alt.badge.img+14
  • Scholar
  • July 24, 2018
It is now working with this code

which field exactly did you put your custom class in? 'Control CSS class' or 'CSS class'?

it should have been put into 'CSS class' and for that case my above code works.


Forum|alt.badge.img+6

I see. I have put it on my control CSS class since CSS class already has a default CSS in it.


Forum|alt.badge.img+14
  • Scholar
  • July 26, 2018

remember to use 'CSS class' for these purposes.

'Control CSS class' is being used for inner control's elements. it can be applied multiple times for one single control or it may not be applied at all for some type of controls. so it may provide unexpected outcomes.