The CreatorCon Call for Content is officially open! Get started here.

form section disable expand/collapse icon

franco0119
Kilo Explorer

I would like to disable the expand/collapse button from the form section I created. I want it to always show Screen Shot 2018-02-10 at 11.18.46 AM.png

Thanks!

4 REPLIES 4

Rajesh Mushke
Mega Sage

Hey franco0119,



Might be helpful to you.



SectionsGroups related information on the form. To enable or disable form tabs, click the gear icon in the banner frame () and toggle the Tabbed forms option.

Users can use icons to collapse (collapse form section icon) or expand (expand form section icon) form sections when tabbed forms are disabled. When you collapse or expand a form section, your selection is saved as a user preference. The next time you access a record that uses the same form, the same sections are collapsed or expanded.



Please Refer:


Forms



Let me know if you need more help.




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

Hi Franco,



As rajesh has already suggested one solution for this. but if you really want to hide it for this form then you can use dom manipulation to hide it.



Note: i would not recommend you to go with dom manipulation because in upgrade time it will be break.



if you really need it then refer the script below.



create onLoad client script



function onLoad() {


    //Type appropriate comment here, and begin script below


    var thePostButton = document.getElementsByClassName('icon-chevron-right btn btn-icon');


        for (var i = 0; i < thePostButton.length; i++) {


                  thePostButton[i].style.color = 'transparent';


                  thePostButton[i].style.background = 'transparent';


                  thePostButton[i].style.border = 'none';


                  thePostButton[i].style.visibility = 'hidden';


        }


}



Note: you can get "icon-chevron-right btn btn-icon" button class name from console.



find_real_file.png


Rajesh Mushke
Mega Sage

Granular control…WITHOUT impacting the user preference

The problem with the script above is that YOU'LL PROBABLY NEVER USE IT! I can't think of a single scenario where you would want to toggle tabs and have that user preference enforced for a user globally. You'd just set the global default preference and be done with it.


This becomes MUCH more useful though if you can control the tabbing behavior without modifying the system property. Maybe you want to just expand the form sections for a particular table based on a specific condition without impacting the list tabs and without impacting the behavior anywhere else. The following can be used in your client scripts to accomplish this…



g_tabs2Sections.deactivate(); //Deactivate form tabs
g_tabs2Sections.activate(); //Activate form tabs



g_tabs2List.deactivate(); //Deactivate list tabs
g_tabs2List.activate(); //Activate list tabs


Please Refer:


Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

JK1
Giga Expert

I used a jquery script to remove this element from the DOM. I know its not best practice but no other simple way found so far to do it on specific forms, co ditions and users. Just use the inspector, find you element and disable or remove it.



Cheers,
Joro