Hide a radio button choice through javascript/css

  • 11 July 2018
  • 5 replies
  • 22 views

Badge +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

Userlevel 5
Badge +14

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;
}
Badge +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

Userlevel 5
Badge +14
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.

Badge +6

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

Userlevel 5
Badge +14

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.

Reply