Remove Gap between Fields.

Hemanth Naik
Tera Guru

Hello everyone, I have a requirement 

I have a field "category" when form loads initially its value is "none" .so I am trying this scenario when category value changes to other ". I want to hide Description and short description fields. I have written a client script to hide them and remove the gap between the fields but as the fields are in different sections the gap is not clearing. Can any one please help How to remove gap between them.

code:

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading ) {
        return;
    }
    if (newValue == 'Other') {
        g_form.setDisplay('description', false);
        g_form.setDisplay('short_description', false);

    }
    else{
        g_form.setDisplay('description', true);
        g_form.setDisplay('short_description', true);
    }
}
1 ACCEPTED SOLUTION

Hi @Hemanth Naik 

 

UI policy i mentioned to avoid client script. There is no way to overcome this space, as we are hiding attribute not removing so it will be still there.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

5 REPLIES 5

@Anubhav24 , Thanks for replying

As, i checked it worked only when fields are in same section, if you checked with condition of other section fields can you please add screenshots, As you said i checked those fields they don't have any conflicting scripts.