There are 2 ways that we use to pass user information to Landing Pages:
Option 1: QueryParameter
In Email:
%%[VAR @email,@name,@landingpage
Set @email = 'email@example.com'
Set @name = 'Test'
Set @landingpage = Concat('https://pub.exacttarget.com/landingpage?email=',@email,'&name=',@name)
]%%
<a href = "%%=RedirectTo(@landingpage)=%%">Click Here</a>
On LandingPage:
<form>
Name:<br>
<input type="text" name="name" value="%%=v(QueryParameter('name'))=%%"><br>
Email:<br>
<input type="text" name="email" value="%%=v(QueryParameter('email'))=%%">
</form>
Option 2: LookupRows & DataView
In Email:
%%[VAR @subscriberkey,@landingpage
Set @subscriberkey= '123456789'
Set @landingpage = Concat('https://pub.exacttarget.com/landingpage?key=',@subscriberkey)
]%%
<a href = "%%=RedirectTo(@landingpage)=%%">Click Here</a>
On LandingPage:
%%[
var @key, @email, @name
set @key = QueryParameter("key")
set @email = FIELD(ROW(LookupRows("_Subscribers","SubscriberKey",@key),1), "EmailAddress")
set @name = FIELD(ROW(LookupRows("Example_Customer_Data_DE","SubscriberKey",@key),1), "Name")
]%%
<form>
Name:<br>
<input type="text" name="name" value="%%=v(@name)=%%"><br>
Email:<br>
<input type="text" name="email" value="%%=v(@email)=%%">
</form>
Note that both of these methods are taking values from AMPScript at the time of send, and appending them to the destination URL string. For this reason, you may need some security/hashing/encoding to prevent malicious attempts to access your customer data via the form.
I hope that helps.
Best Answer
Based on what you provided in your question and what I understood you are asking, see below answers. If you can provide more details on your question, I may be able to provide better solutions.
Lookup()
function to gather these as variables and display the variables. E.g.SET @YourVariable = (Lookup(yourDE,"FieldtoLookup","SubscriberKey",SubscriberKeyValue)
and in the HTML, use%%=v(@YourVariable)=%%
to display it.required="required"
or add in some JavaScript validation script into the HTML.AttributeValue()
if coming fromMicrositeURL()
or you can do a variable with a lookup, like explained in #1. You would need to pass a parameter in the link, something like?Email=Sampleemail
to use this.RequestParameter()
) and useIF ELSE
statement to define content/styling.Reference:
MicrositeURL() & RequestParameter()
AttributeValue() & v()
Lookup()