0

I have a Smart Capture form on my CloudPage for lead generation. The DE it fills is using EmailAddress as the primary key. If the user submitting the form already exists in the DE and they attempt to complete the form, I want to redirect the user to a different URL letting them know they are already subscribed.

Currently, if the user already exists, the form does not submit. The user doesn't know why and it's a bad UX. I think I can use AMPscript to do this, but am fairly new and not sure what the code looks like.

0

You can do something like this

%%[SET @emailaddress = RequestParameter("EmailAddress")
SET @isExsistingCustomeremail = Lookup("YourDE","EmailAddress",@emailaddress)

IF(@isExsistingCustomeremail) THEN
//Redirect user to the other url
ELSE
//Upsert the data in your DE]%%
 ENDIF
1
  • Thank you! This was very helpful
    – Nicole
    Jul 15 at 5:11

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.