The question is why do you want to pass that whole value. Reason being is that it's simply an encrypted payload which includes reference to the subscriber + few default attributes + potentially additional attributes you might have passed if you've used MicrositeURL
function when that link was initially generated.
If you need to pass same parameters to your processing page there are two ways:
1. as you've found out and as mentioned by @David - submit the page to itself.
2. have a separate processing page, but use MicrositeURL
function in the email to generate link to it and then include that link into your profile center URL as one of the request parameters. This way you can retrieve it on the form page and use for action
attribute on the form.
So consider your email content (assuming that is how you do get your current page URL):
...
%%[
SET @processingPageURL = MicrositeURL(NNX, "attr1", "value1", "attr2", "value2")
SET @preferenceCenterURL = MicrositeURL(NNZ, "processingURL", Base64Encode(Replace(@formURL, "=", "_")))
]%%
<a href="%%=RedirectTo(@preferenceCenterURL)=%%">To the preference center</a>
...
Now within your preference center page you can have following:
...
%%[
SET @formURL = RequestParameter("processingURL")
SET @formURL = Base64Decode(Replace(@formURL, "_", "="))
]%%
<form action="%%=RedirectTo(@formURL)=%%" method="POST">
...
That should do the trick :)
P.S. the encode/decode Base64 along with replacement of the =
with _
and backwards will ensure that you pass allowed text. Thanks to David for helping me with that earlier.