I have a cloudpage containing a Smart Capture form that submits to a data extension. I am using Smart Capture because a submission then instantly triggers a journey entry.
The idea is that a subscriber gets to the page via an email link. Clicking on the link passes through their SubscriberKey. I then do a lookup to see if that SubscriberKey exists in the smart capture DE or not.
If they have never submitted the form (ie: their SubscriberKey is NOT already in the smart capture DE), then I want the smart capture from to display.
If they have already submitted the form, then I want to hide the form and display an alternate message.
I was thinking of using some AMPScript logic like this:
%%[
IF @result = 'eligible'
]%%
<!-- SMART CAPTURE FORM -->
%%[ ELSE ]%%
<!-- ALTERNATE MESSAGE -->
%%[ ENDIF ]%%
The issue I'm having is that when using the drag and drop editor with content blocks, the code view of the page doesn't show all the html for the form, etc. It instead only shows the basic "slot" divs. So I don't understand how to get the above to work.
Is this a feasible approach? Or is there another better way to show/hide content and/or content blocks on a page using AMPScript variables?