APP Bridge Modal call function in iframe

Highlighted
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

0 Likes
Highlighted
Shopify Staff
Shopify Staff
53 9 20

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.

0 Likes
Highlighted
Shopify Partner
2 0 0

Great thanks!

0 Likes
Highlighted
New Member
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?

0 Likes
Highlighted
Shopify Expert
57 0 19

did anyone get this working in app bridge? 

I'm also porting a project that depended on 

ShopifyApp.Modal.window()

 

0 Likes
Highlighted
Shopify Expert
5 0 0

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!

0 Likes
Highlighted
Shopify Expert
57 0 19

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

0 Likes