Hope I can explain this right.

I would like to request assistance on how can I disable the submit button on the Cloud page form after submitting a duplicate email in which the email address is set as the Primary Key.

Here is my Amp script code in the Cloud page

Set @EMAIL= RequestParameter ('EMAIL')
Set @FIRSTNAME= RequestParameter ('FIRSTNAME')
Set @LASTNAME= RequestParameter ('LASTNAME')

On my data extension, I set EMAIL as the Primary Key.

EMAIL relates to subscriber on Subscriber Key

When I answered the Email (value of email = [email protected]), First name and Last name field on the form (Cloud page) it will submit.

Then I answered again the form (Cloud page) using the same values (value of email = [email protected]) it will still submit.

When I look on the Data Extension of the form, there is one value which is [email protected] email address in which I answered the form twice using the same address.

What I want is, when I answered the form for the second time using the same email address the submit button will be disabled
(Because there is already an EMAIL = [email protected] value on the Data Extension from the first submission of the form)

1 Answer 1


Your request is understandable and requires several things:

  1. Firstly, it is was not specified whether your form is actually a SmartCapture form of the custom one. For your case, it would be easier to create a CloudPage with a form that would be tweaked based on your needs.
  2. Your case presumes dynamic validation of the input data into the form. In other words, you need to do validation in input data to the "Email Address" field and then do a LookUp into the Data Extension to check if the same "Email Address" value exists and then based on that either allow a customer to submit the form or disable the button to submit and show error text that your submission has been already captured.
  3. You can re-use this example of AJAX form submission (kindly provided by @AdamSpriggs) and adjust it based on your needs.
  • Hi @niko, I am using Smart Capture for the form (With Amp script code). What I want to achieve is when we fill up the form for the second time we use the same email address. The submit button will be disabled (user will not be able to submit the form) Jul 23, 2021 at 7:04
  • Hello @HarveyLinarez, then I perceived it correctly, to fulfill your requirement you would need to switch to the custom CloudPage where you would do the same form and logic of DE population with a validation on top that would check email addresses.
    – Niko
    Jul 23, 2021 at 7:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .