Can a button on one page open a modal in another page in the same site?

Hi all,

Can a button on one page trigger a modal which exists on another page in the same site? Both the button and the modal exist in the main body of the page (i.e. not in the header or footer.)

I have a site with a lot of subscription forms, and I’m trying to avoid any unnecessary duplication.

Any help appreciated.

I don’t think this is possible. My experience is that you will have to add the modal to a global area if you need to access it from other pages. Doing this doesn’t affect the visual layout of your pages when viewed in a browser because a modal overlays your page content.

Hi @hendon52,
That’s the conclusion I was coming to, but I thought it best to ask the question in case my original layout/intention was possible.
Thanks for your fast response! I’m going to do as you suggest.

Back again with this headache…
Having moved the modal into the top global area, along with its trigger button, the modal id does not show at all when I select ‘Toggle modal’ as the action… the only option offered is ‘No selection’.
(The modal and its trigger button both show on every page, but on every page, I can’t select the modal ID.)

I think I’ll create a separate page for the ‘Free Issue’, create the modal there, and it will then link to the download page. Seems like to solution for now.

It may be best to create the modal in its own bloc and then save the bloc to your bloc library. This way you can add it to any page in your site and just rename the ID on each page. The trigger link can then be set on each page rather than in the global area. Worth experimenting with!!!

EDIT: Just tried it by putting the trigger into the global area and saving the modal bloc to the bloc library. Inserted the bloc on another page and it worked without changing the ID name. I guess the ID name is unique to the page only rather than a site-wide ID. Anyway, it does work.

Hi again,

Many thanks for your assistance. Will definitely do make that change as soon as I get to the bottom of the Form problem!
Best wishes.