I have the following pat-plone-modal
link :
<a href="${context/absolute_url}/@@my-form" class="pat-plone-modal">Open my form in modal</a>
where @@my-form
is a z3c.form.
When the form is submitted with validation errors, the response is displayed in modal with error. Great !
What I'd like is for the response to be injected (with pat-inject
) into another part of the page when the form is successfully submitted, rather than reloading the page.
I saw in the documentation that I can set option reloadWindowOnClose
to false
to avoid reloading the page.
<a href="${context/absolute_url}/@@my-form" class="pat-plone-modal" data-pat-plone-modal='{"actionOptions":{"reloadWindowOnClose": false}}'>Open my form in modal</a>
How do I get the form succesfull response to replace the #a-section-in-my-page
section of my page ?