0

I created 3 landing pages, each of them has a smartcapture form inside. These forms (questionnairs) should be linked between them. I've been able to link these 3 landin pages through the SmartCapture submit button. I also used these Ampscript

%%[SET @myvariable = _subscriberkey
SET @emailaddress = emailaddr]%%

to retrieve the SubscriberKey and the EmailAddress. I inserted into the hidden attributes of the form:

%%= v(@myvariable) =%%
%%= v(@emailaddress) =%%

I did this procedure in each landing page. However Marketing Cloud is retrieving only the SubscriberKey and EmailAddress from the first landing page. So the answers in the 2nd and 3rd form on the 2nd and 3rd landing page are without a SubscriberKey and Email Address.

How can I link multiple SmartCapture forms on different landing pages and retrieve customers' SubscriberKey and EmailAddress?

Thank you very much

0

You can generate an "Submission ID" in the first form to link the Forms. Set the Redirect URL in the SmartCapture to be generated with AMPScript and put this "Submission ID" as Query String, so in the other pages you should request that parameter and, if exist, you load the Data from the Data Extension.

In Page one you generate:

var @IDFormFill
set @IDFormFill = GUID()
var @LP2
set @LP2 = Concat("https://yourdomain.com/lp2?fillid=",@IDFormFill)

In your Smartcapture HTML, find the option onSubmitShouldGotoUrl, and set the value to: "onSubmitShouldGotoUrl": %%=v(@LP2)=%% (If you try to change in CloudPages SmartCapture UI, it will not work).

And set this IDFormFill as a hidden input <input name="fillid" type="hidden" value="%%=v(@IDFormFill)=%%">

So after submission, your next page will receive this IDFormFill ("Submission ID) in Query Params (as fillid).

In your second Landing Page, you can request this parameter and to load the data from your Data Extension.

%%[
  var @DataExtensionName, @IDFill, @ResultRows, @Row

  set @DataExtensionName = "YOUR_DE"
  set @IDFill = requestparameter('fillid')

  if not empty(@IDFill) then

    /*  */
    set @ResultRows = LookupRows(@DataExtensionName,'fillid', @IDFill)

    if rowcount(@ResultRows) > 0 then
      var @Email, @sKey

      set @Row = Row(@ResultRows, 1)
      set @Email = Field(@row, 'EmailAddress')
      set @sKey = Field(@row, 'SubscriberKey')
  endif
]%%

You will need to send the same @IdFill, as Query Params on onSubmitShouldGotoUrl, in LP2 to LP3, as it is done from LP1 to LP2

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.