Announcements
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,186 Super User 2024 Season 2
Martin Dráb 227,996 Super User 2024 Season 2
nmaenpaa 101,148