Capture Data on Thankyou page after Smart Capture form submit

ampscriptmarketing-cloudsmart-capture

I’m trying to find a workaround to capture submitted Smart Capture form values and passing them onto another DataExtension in addition to saving it to the DE that was initially defined in the SmartCapture form.

The scenario is that we have a DE for each form and one “All Leads” DE that should hold all data from the various form across the system.
If I delete the Smart Capture and use a regular form action and post, everything is fine but I’m trying to enable non-technical teams to use the system so keeping it as generic as possible is a must.

Attempt No1:

Use RequestParameter on TY page – nothing

Attempt No2:

Use another function on the 1st LP to set the values with a script:

document.getElementById("smartcapture-block-XXXX").addEventListener(
"submit", function(e) {

     var firstName = document.getElementById("firstName").value
     var lastName = document.getElementById("lastName").value
     var mobilePhone = document.getElementById("mobilePhone").value
     var emailAddress = document.getElementById("emailAddress").value

     });   
     

and using hidden input fields to “catch” their values:

This didn’t work as well.

Any ideas are welcome at this point.

Thank you

Best Answer

Instead of writing to a second DE on the CloudPage, can you use a SQL activity in an Automation to regularly combine the DEs from the SmartCapture form and populate the All Leads DE?

Related Topic