[SalesForce] Remove Footer from Lightning Action Visualforce

I added a new custom action with a visualforce page as the content. But it still has the cancel and save buttons at the bottom of the action. I'm trying to remove these as they do not make sense in my action. Here is the style I've tried adding to hide them:

.slds .modal-footer .slds-modal__footer {
    display:none;
}
.modal-footer .slds-modal__footer {
    display:none;
}
.slds-modal__footer {
    display:none;
}
.modal-footer {
    display:none;
}

Can I hide the footer or override the values in buttons?

Best Answer

You will not be able to impact the styles of the action modal from your Visualforce because Salesforce uses an iframe to place your content. This is a security measure and is explicitly meant to stop you from stepping outside the bounds of your page (even if you are trying to do something harmless like hide the modal buttons).

If you are willing to convert your page to a lightning component take a look at the force:lightningQuickActionWithoutHeader interface which will allow you to make a component quick action without the header or controls.

Additional details can be found here.

Just to give a preview this is what an example looks like:

enter image description here