0

I'm doing a smart capture form on cloud pages to update some interests of my subscribers. I created a new data extension with this fields. I want to send an "Update interest" Email which redirect to the landing page with this form.

I want the form to pre-populate and take the email of the user that clicked, so the contact don't type it again.

I tried this:

On the email:

URL/?asoc=CRM&%%email%%

On the landing page: I create a hidden field: email. And on a text block I used:

%%[ var @email set @email = RequestParameter("email") ]%%

and on the form:

<input name="email" type="hidden" value="%%=v(@email)=%%">

It didn't work.

Do I need to ask some other information? Or use another request parameter?

I read this: https://help.salesforce.com/articleView?id=mc_es_pre_populating_smart_capture_fields_with_salesforce_data.htm&type=5 and I don't get the "Contact_Owner_ID" thing.

Can someone help me?

Regards. Alma.

2 Answers 2

3

In your email URL, you will need to assigning the parameter called 'email' and then apply the value like so :

URL/?asoc=CRM&email=%%email%%

However, I'm not 100% certain a SmartCapture form will be able to execute AMPScript in a text block. Personally I don't use SmartCapture and would typically build a custom cloud page, in which case the RequestParameter() function would work as you document - but you need to add email= as a parameter tag to your URL

%%[ var @email set @email = RequestParameter("email") ]%%

Some words of advice / best practice however - in your solution, you intend to pass a raw/visible email address in the URL. This isn't a recommended practice as it's publicly visible. Also labelling the parameter 'email' wouldn't be advisable as it's clear what the expected value will be.

Ideally you should encrypt your email address (or any PII data), then apply it to the URL. On the Cloud Page you would then decrypt it etc. The reason for being security conscious is for example, if a customer clicked on a link at an Internet Cafe, their PII data is easily visible in Proxies etc.

Another (easier) alternative would be to use the CloudPagesURL() function, which you can then pass the values securely/encrypted to the could page and then retrieve the values using the RequestParameter() function

View the CloudPagesURL() technical here

1

If in your email you're using the cloud pages URL function to link to your landing page, you can access any of the values which exist in the sendable DE from the cloud page.

Eg. if you had a field called email in your DE %%email%% in your smart capture form will display it. To pre-populate the field you can just add value = "%%email%%" in the form fields HTML.

You must log in to answer this question.

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