Hi
I am using a marketing page (landing page) for external users to subscribe a newsletter.
i applied a unique key to email address for the Contact entity. However, when a user tries to re-subscribe with the same email, the user record is updated with the later selection instead of preventing with an error.
How i can make the Marketing page preventing the re-submission with same email.
Thank you so much,
Siva
thank you Cofly,
Following solution helped me to resolve the issue.
Regards,
Siva
HI Siva,
Could I confirm some details of your requirement:
How long would you like to prevent user to submit form with same email?
You could use localStorage object to store previous email, at formSubmit event, read the value from ls object and compare whether it is equal to current email, if yes, then do event.preventDefault.
However, it won't be cleared automatically unless users clear their browser cache, or we could set a expiration timestamp in ls object, the ls will be remove it when a specific time comes.
Regards,
Clofly
Daivat Vartak (v-9d...
225
Super User 2025 Season 1
Muhammad Shahzad Sh...
106
Most Valuable Professional
Eugen Podkorytov
102