Can you please let me know what is required to be redirected/forwarded to a page on form submission.
It works perfectly fine on adaptive form page but when i embed adaptive form on a sites page using OOTB AEM Form component (fd/af/components/aemform), submit button does not work, give me below exception
java.lang.IllegalArgumentException: Not a valid identifier 'index,index.html'.
Also, i would like to know how can we access custom parameter which was set in redirectParameters on thank you page.
I have configured target page in AEM Form component as well as in adaptive form page, Adaptive Form Container -> Submission section.
Once you have your Page ready you can simply go the Adaptive form root container and set the redirect URL. Even if you do not have custom template or Page you can use the Sample templates provided for the testing purpose and create a page using we.retail or we. Gov (http://localhost:8080/lc/sites.html/content).
I have the same question. I'm having trouble finding documentation that describes how to set up a custom thank you page. Is there documentation or a blog post or a tutorial or an article on this anywhere? Srikanth, did you find a solution? Can you share it here? Much appreciated if you can. Thanks.
After performing the required action, the Submit servlet forwards the request to the forward path. An action uses the setForwardPath API to set the forward path in the Guide Submit servlet.
If the action doesn't provide a forward path, the Submit servlet redirects the browser using the Redirect URL. The author configures the Redirect URL using the Thank You Page configuration in the Adaptive Form Edit dialog. You can also configure the Redirect URL through the Submit action or the setRedirectUrl API in the Guide Submit servlet. You can also configure the Request parameters sent to the Redirect URL using the setRedirectParameters API in the Guide Submit servlet.
We have a public API but seems like its missed in the documentation. To set the redirect url and parameters you can use the following APIs.
com.adobe.aemds.guide.servlet.GuideSubmitServlet public static void setRedirectUrl(final SlingHttpServletRequest req, final String redirectUrl) public static void setRedirectParameters(SlingHttpServletRequest request, Map<String, String> value)
But setting the header in the custom submit action throws an IllegalStateException. Maybe the exception is thrown because the GuideSubmitServlet has already started to write to the response before my custom submit action is called.
Is there another possibility to set the redirect location?