Questions and discussions about using the Shopify CLI and Shopify-built libraries.
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
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.
Great thanks!
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?
did anyone get this working in app bridge?
I'm also porting a project that depended on
ShopifyApp.Modal.window()
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!
I got this working today also. Very different approach, but I got it to work also.