We need to be able to use an absolute action url in the AEM form component, this way we can post to a different domain than the one that is used to open the AEM page with the form on.
We already managed to set a custom, absolute action url to the form container.
However posting the form does not work; a blank page is shown after the submit and nothing is shown in the logs.
We think maybe a filter blocks this submit for security reasons, but we're not able to determine which one (already disabled the referrer filter for post, but this did not help)
Example of the way we are currently testing this:
<form method="POST" action="http://author.localhost.com:4502/bin/forms/post" id="test-whitelist" name="test-whitelist" enctype="multipart/form-data" class="cmp-form aem-Grid aem-Grid--12 aem-Grid--default--12">
<input type="hidden" name=":formstart" value="/content/test/en/TestFormPost1/jcr:content/rootLayoutContainer/root/responsivegrid/container">
<input type="hidden" name="_charset_" value="utf-8">
<input type="hidden" name=":redirect" value="http://localhost:4502/content/test/nl.html">
<div class="text aem-GridColumn aem-GridColumn--default--12">
<label for="form-text-749542657">Text input field</label>
<input class="cmp-form-text__text" data-cmp-hook-form-text="input" type="text" id="form-text-749542657" name="text">
<div class="button aem-GridColumn aem-GridColumn--default--12">
<button type="SUBMIT" class="cmp-form-button">Submit</button>
For testing we're opening the page at: localhost:4502, posting to author.localhost.com:4502 and redirecting back to localhost:4502
When we keep the domain of the page and the action url the same, the submit works correctly.
AEM Version: 6.4.4
Nb: We're using the basic form components (i.e. not adaptive forms)
In practice we will be posting to a sub domain.
Any help is much appreciated!
Solved! Go to Solution.