1

On form submit I want to redirect the user to a cloud page url.

When I use the following code

%%=Redirect('whole cloud page url')=%%

On form submission, I get 500 error.

To test if my code is working:

 %%=Redirect('google.com')=%%

And this worked. Is there a different function for CloudPage URL Redirect?

Thanks

2
  • Is the cloud page working? Might be an issue with the form..500 errors usually indicate backend errors (SSJS or Ampscript)
    – 0xsegfault
    Oct 19, 2017 at 6:52
  • Yes it’s working correctly. It’s just when I add redirect code, I get 500 error
    – Chandan
    Oct 19, 2017 at 23:44

2 Answers 2

5

Is the Cloud Page published? Did you use CloudPage ID, not URL?

Example: %%=RedirectTo(CloudPagesURL(55555))=%%

You can grab CloudPage ID from Cloud Page details.

enter image description here

3
  • I want to redirect to the cloud page once the form submits successfuly. When I used %%=Redirect('google.com')=%% I can see that on form submission the page is redirected to google.com. However when I used below %%=Redirect(CloudPagesURL(4343))=%% or %%=RedirectTo(CloudPagesURL(4343))=%% It showed 500 error.
    – Chandan
    Oct 19, 2017 at 22:09
  • As noted by Data_Kid earlier, this message can pop up when there is a script error on the page. Can you post the page on pastebin?
    – Rain
    Oct 20, 2017 at 6:35
  • When I remove the the %%=Redirect(CloudPagesURL(4343))=%% or %%=RedirectTo(CloudPagesURL(4343))=%%, there is no 500 error in the page. This means that that there is something wrong with Redirect Function, as its not working in cloud page.
    – Chandan
    Oct 21, 2017 at 0:12
0

Inside a form do not use RedirectTo() function. CloudPagesURL() is sufficient.

<form action="%%=CloudPagesURL(YOURPAGEID)=%%" id="formID" method="POST">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .