Who has never been tempted to use
in their application? Control which allows to add an iframe in a form, allowing to insert a 2nd form inside the first one.
Several advantages:
- Pass a parameter of the parent form to display data
- To be able to change the content of a part of a form without reloading the complete page
Once in place, arrives the famous problematic: “Thin, how to call a rule present in the form contained in my
?” 🙄
The solution is quite simple, you have to go through JavaScript to set up this mechanism:
- In the form in the content control:
This function
will be called by the parent form, the ID contained in my example (00000000-0000-0000-0000-000000000000_e9f68a84-dafc-4dd8-b32f-27397cfe33e8) is the ID of the button I want to call. To find these IDs, it’s easy, launch the form and use the F12 function to locate the button and retrieve its identifier.
😎 Tip: It will not change when you change environment.
- In the parent form:
Mind you, the parent form can not know that the rule executed in the child form is complete, so be careful about expensive queries in time of execution to not close the form too quickly.
It’s your turn 😉