Custom Presenter Pop-Up - Hide Footer

Hi,

I’ve created a custom presenter to show text and when clicked it opens a pop-up window,
however I’m unsure how I can go about hiding the footer for this window without disabling the footer for all modal windows.

We’re using a submit button/link on the pop-up already to save/close so currently it’s just a duplicate that doesn’t really do anything

I’m using the below code to create the window:

popup_page:function(e, id) {
if (this.linkTo == null) return;
var url = this.linkTo+ “?context_record_id=”+id;
e.preventDefault();
if (url.startsWith(“/i”)) {
window.location = url;
}
else {
new mats.system_modal_popup(url);
}

		return false;
	}

Is there anything that can be passed into the system_modal_popup to disable the footer?
(I’ve tried to also use getElementsByClass / getElementByID to try and get the footer class to remove it/ hide it to no luck.)

Thanks,
Liam

1 Like

Hi,

Using mats.system_modal_popup comes with risk as it may change without any notice as it’s not an officially documented component, but you could try the below:

new mats.system_modal_popup(url, {
	display_footer: false
});
1 Like

Thanks! that worked perfect,

Assuming a better way - to avoid using mats.system_modal_popup - would be to create the pop-up using a mix of HTML instead?

Depending on what you are trying to achieve if it needs to be a custom solution, you could create a widget or a presenter and have a popup in there.
Alternatively use the mats.system_modal_popup but accept that in the future it may stop working or need tweaking.