I would like to insert PloneFormGen form into an iframe on different third party sites, just as a common share widget. The use case is a petition using collective.megaphone. The form should be displayed, validated and thank you page displayed in embedded mode in the iframe.
It basically, works, I can use http://my.site/my-form/@@embedded as iframe source and the form is displayed and validated inside iframe, but as soon as the form is submitted, Thank you page is displayed inside iframe in full Plone layout including header, portlets etc. This is not what I really want. I'm looking for embedded version of thank you page.
I have created embed.js for IMegaphone which returns a snippet inserting an iframe into target page DOM. The iframe src points to custom template which returns just embedded version of the form
<div tal:define="form nocall:context/@@embedded"
If anyone wants to insert the form into own webpage, he can just add