UI formatter showing/hiding on the form based on a choice field and make it mandatory.

shruthi29
Kilo Contributor

Hi all,

I have a requirement where I have a drop down field, and based on the selection of the choices, I need to make a UI formatter visible/hide on the change request form.(if choice is 'Yes', then show the UI formatter and make it mandatory, if 'No' then hide it.).

Is it possible to achieve this? If yes, kindly share your ideas with me. Any help is high appreciated.

Thanks and Regards,

Shruthi

7 REPLIES 7

Deepa Srivastav
Kilo Sage

Did you try using onChange client script? You can use setVisible and give formatter name ...



Hit like, Helpful or Correct depending on the impact of the response


Yes, I have tried. But it does not work.


UI formatter in not a field so setVisible or setDisplay method will not work.


You will have to try out DOM level manupulation.



You can use the $ selector to element ID and hide it using DOM methods when particular condition is met.


You can check below link for sample example



How to hide the attachments showing on top of item and task forms


I guess you also can take a look at my blog post where I use DOM manipulation to hide the an UI action.



How to hide/show an UI action on field changes



//göran