Control visibility on parent page when button is clicked in Iframe

0
We are using iFrame to show form to a user. Once form is filled in and user clicks button "Validate Details" (which is rendered using URL and is not Mendix button), I need to hide iFrame and show container which has Message "Your Details saved" and button to Change details that were submitted. This container is available in parent page. When user clicks on "Validate Details" we get post callback on Mendix published API to save some data. How can I identify if user has clicked button "Validate Details" and control visibility ?  
asked
1 answers
0

Hi Shriram,

To achieve this, you can use a small workaround since the "Validate Details" button is outside Mendix control. When the user clicks this button, your external form triggers a POST callback to your Mendix Published REST API. In that API logic, you can update a non-persistent helper entity (e.g., FormStatus) with a flag like IsFormSubmitted = true. On the Mendix page where the iFrame and the "Your Details Saved" container exist, use a Microflow Timer (available from the Mendix Marketplace) to periodically check this flag by calling a microflow. Once the flag is set to true, you can update a visibility condition or use a page parameter to hide the iFrame and show the confirmation container. This lets your Mendix UI react to an event that happened outside its usual lifecycle, in a clean and reactive way.

Let me know, if you have any issues,

Hope it helps!

answered