Hide / Remove Form Actions | Community
Skip to main content
Level 3
October 16, 2015
Solved

Hide / Remove Form Actions

  • October 16, 2015
  • 3 replies
  • 2055 views

Hi,

I am trying to hide the unwanted form out of box actions  , is there proper way to hide the same.

please refer the attachment and what I am trying to hide.

Best answer by Mshaji

I suggest you to is copy the existing form from /libs/foundation/components/form

and create your own form component name it differently. In your app form you will be having /apps/<your_app_name>/foundation/components/form/actions

There are couple of scripts you need to modify in order to achieve desired functionality

3 replies

MshajiCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

I suggest you to is copy the existing form from /libs/foundation/components/form

and create your own form component name it differently. In your app form you will be having /apps/<your_app_name>/foundation/components/form/actions

There are couple of scripts you need to modify in order to achieve desired functionality

MahamoodAuthor
Level 3
October 16, 2015

Thanks for the update , basically the requirement is not to display the OOTB form actions to authors . I was looking for options to hide the OOTB form actions I tried to apply ACL , but it did not work other option tried is inside lib/foundation/component/form/actions and lib/foundation/commerce/component/actions node there are 4 components are there from where the list is appearing in OOTB form action. I removed the sling properties sling:resourceType=foundation/components/form/action , then the OOTB list got disappeared in form action.

Even I tried to do overlay , but it does not help.

I am not sure this is the best practice or good solution approach , please advice.

anjali_biddanda
Level 4
June 3, 2021
Hi @mahamood. I'm trying to do the same. I tried overlaying the form action and using sling:hideResource. Did you manage to do this?
AmitVishwakarma
Community Advisor
Community Advisor
January 18, 2025

To hide/remove form actions in AEM:

  1. Override Form Component: Customize or create a new component to control form actions.
  2. Use CSS: Add custom styles to hide actions: .form-actions .your-action-class { display: none; }
     
  3. Modify JSP/HTL: Remove or comment out the code rendering actions.
  4. Javascript&colon; Hide actions dynamically with:document.querySelector('.your-action-class').style.display = 'none';