1

I am very new to using AMPScript both for Landing Pages as well as on emails. Hoping the SFMC Demi Gods can provide me with example for the following functions:

  1. pre-populate a Landing Page with Data Extension values already gathered and update them as needed by completing the form.

  2. make fields required e.g. first name and email address - while using Landing Pages Smart Capture and NOT Cloud Pages.

  3. Perform a lookup on a table - (ET – SFMC) does not support lookup fields with the Smart Capture.

  4. Display personalization using Data Extensions on a smart capture or a HTML paste field such as email address, and prior purchase.

  5. Display a different thank you/final page based on Gender on a Smart Capture Landing Page, if that is possible.

  • This is a very broad question. You're unlikely to get many answers without some details about what you've tried already. – Adam Spriggs Feb 24 '16 at 12:10
1

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.

  1. Use the 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.
  2. Use required="required" or add in some JavaScript validation script into the HTML.
  3. AMPScript is a server-side language, it cannot be used to look up info that is in the HTML (e.g. a table). To pull values from tables, try JavaScript or jQuery for this.
  4. You can use AttributeValue() if coming from MicrositeURL() 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.
  5. You would need to change the POST location or otherwise edit the processing page to use AMPScript to pull gender (e.g. RequestParameter()) and use IF ELSE statement to define content/styling.

Reference:

MicrositeURL() & RequestParameter()

AttributeValue() & v()

Lookup()

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.