I've created a simple landing page in Cloud Pages using the new Content Builder editor. I've then created a simple smart capture form for a survey to send to customers. This smart capture form is linked to a DE where responses are stored. EmailAddress is a field within this DE and is the primary key.
I want to be able to link through to a handling page after a customer has completed the form and hit submit at which point, I want to check if the email address entered in the form exists in the responses DE. If it doesn't, it will display a Thank you message. If it does, it will display an error message.
I've tried passing the email address field value using the cloudpageurl ampscript function and the requestparameter ampscript function on the handling page but have had no luck.
On my survey page I have this AMPscript in a content block at the top of the page;
%% [ SET @Email = RequestParameter('Emailaddress') SET @HandlePage = CloudPagesURL(218, 'Emailaddress', @Email) ]%%
followed by this email field in the smart capture form;
<div class="sc-formfield-input"> <input name="EmailAddress" data-field-type="EmailAddress" data-validation="email" required="required" data-validation-message="Please enter an email address." style="height: 30px !important;" type="email"> </div>
On my handle page I then have this AMPscript;
%% [ SET @Email = RequestParameter('Emailaddress') ]%% Email = %%=v(@Email)=%%
But nothing gets pulled into the email value on the handle page.