Question

Increase Modal Width on Freedom UI

Does anyone know if it is possible to increase the width of the modal on just instance of a modal? 

 

Thanks!

Like 0

Like

15 comments

Hello Harry,



Could you please elaborate on your business task?

Hi Bogdan,

 

I would like to increase the width of the modal popup for edit/new record pages. 

 

In this case, I am using the modal for the default edit page, but I would like to increase the width because the edit page contains lots of long form text fields.

 

Is it possible?

 

Harry,

Hi Harry! 



Did you have an answer to your question? I'd like to do the same! 



Thank you!

Ignacio Alvarez,

According to the roadmap, the ability to resize modal/mini pages is coming sometime Q1 2024. 

https://academy.creatio.com/docs/release/creatio-roadmap?search=mini&ch…

Ryan

Thank you Ryan!

Ignacio Alvarez,

Have you find the way to resize modals?

Andres Arrigonni,

The way that it works now with some of the OOTB dialogs is there is an addon of type "AppearanceSettings" added for the page and the size is specified there. I don't see anyway to create those using provided tools. The following way works but it is completely hacky. This will change the dialog size to large, add this to the handlers: 

{
	request: "crt.HandleViewModelInitRequest",
	handler: async (request, next) => {
		setTimeout(() => {
			const pageName = "cfxsubscriptionsupport_modalpage"; // change to the name of your dialog schema name
			const modalEl = document.querySelector(pageName).closest(".cdk-overlay-pane.modal-container.modal-size-small");
			if (modalEl) {
				modalEl.classList.remove("modal-size-small");
				modalEl.classList.add("modal-size-large");
			}
		}, 100);
		return await next?.handle(request);
	}
}

Hopefully, we'll get full support to do this the right way and this hacky approach will no longer be necessary (the roadmap shows this coming in Q2 2024 - I don't see it anywhere in 8.1.3), but for now this will work.

Ryan

Apparently if you add/enable the below feature, you will get controls on the modal window Page Designer that allows you to select the size of the window from some presets. Not sure which releases this applies to but I think it works in 8.1.2, though I haven't used it myself yet. Given it’s not enabled by default, I would advise some caution with using it and make sure to add some regression testing specifically around it after each Creatio upgrade, but it may help you out if you’re really in need of different Modal Page size:



Harvey Adcock,

Excellent find. I have seen that many ootb modals do have an AppearanceSettings addon in 8.1.2 and higher. I wonder why this isn't on by default? 

Excellent! thanks

It looks like this is no longer in the feature toggles now on 8.1.3 . Could someone else confirm?

deleted

Robert Pordes,

I just tried this in a new 8.1.5 system and still works for me. The feature does not exist ootb, however, if you add it and check "is enabled" (don't forget to click "clear cache") it does still work in 8.1.5:

Added the following in https://CreatioUrl/0/flags

Ryan

Can confirm I got this to work too... I hadn't read Harvey's message entirely which stated you actually had to add a new record with the correct code. Works well and is a great feature - no idea why they haven't released this out of the box yet. 

Ryan Farley,

 

Hi Ryan,

 

you are right, it works in 8.1.5...I had a typo in the feature's name when I tried it. EnabledAppearanceSettings is the correct name and I was missing a letter...

 

I deleted my comment so that no one will be confused.

 

Thanks, Ryan for the clarification!

Robert

Show all comments