APP Bridge Modal call function in iframe

alexdover
Shopify Partner
2 0 0

Hi,

 

I am migrating over to using the new app bridge instead of the embedded SDK and can't seem to find how to replicate a feature I made use of in the embedded SDK.

 

I was able to open a modal specifying a path to the page to load in the iframe - when one of the action buttons is clicked I was then able to call a function in the iframe page e.g.

ShopifyApp.Modal.window().getSettings()

This would allow me to put a form in the modal, allow the user to enter something and then capture that and use it, in my case to update some settings.

 

Does the ability to do this no longer exist in app bridge?

 

Many thanks

 

Alex

Replies 6 (6)

iain-campbell
Shopify Staff (Retired)
54 9 23

Hi Alex! We’re actually working on this feature right now.

 

If you need a workaround immediately, your modal iframe page would need to communicate directly with your app’s server.

To learn more visit the Shopify Help Center or the Community Blog.

alexdover
Shopify Partner
2 0 0

Great thanks!

Rob_Fostr
Visitor
1 0 0

Has there been any updates to this? I would really like to have a form loaded in the modal (via a relative url) and then have the footer buttons submit the form. Is this possible yet?

JoshHighland
Shopify Expert
175 10 65

did anyone get this working in app bridge? 

I'm also porting a project that depended on 

ShopifyApp.Modal.window()

 

SEO Manager - The FREE all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
alex_dover
Shopify Expert
9 0 3

I literally looked into this yesterday as I too am trying to port an older app.

I discovered this - https://shopify.dev/tools/app-bridge/actions/modal#communicate-with-the-parent-page - which seems to solve it!

JoshHighland
Shopify Expert
175 10 65

I got this working today also. Very different approach, but I got it to work also.

SEO Manager - The FREE all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -