Hello there @cogz
Do you mean some kind of validation between two Email fields while typing/submitting?
Please advise!
If so, you could use some JS on the frontend like:
https://dmitripavlutin.com/compare-javascript-strings/#3-safe-comparison-of-strings
Let us know if further assistance is required on this.
Thank you,
Dimitris
Thread Starter
cogz
(@cogz)
Hi,
I would like to prevent the form from being submitted and display a message if the two email addresses do not match.
Thanks
Hi @cogz
We do have this feature planned and I’m adding this thread as one extra vote.
For now, could you please try this workaround?
https://gist.github.com/patrickfreitasdev/12e75dd199799532875b319871904bf1
You can install it as a mu-plugin following this guide:
https://premium.wpmudev.org/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
It validates if both email-1 & email-2 are the same and return an error on email-2 in case it isn’t.
https://monosnap.com/file/Gs1L3xamVnzqJBg5GJe35M5SdYI1NK
You can edit the line 20 adding a custom error.
More reference on https://premium.wpmudev.org/forums/topic/forminator-pro-forminator-double-email-check/
Let us know if this works for you.
Best Regards
Patrick Freitas
Hi @cogz
Just an update.
Make sure to update the line 8 adding your form ID, you can find it editing the form:
https://monosnap.com/file/fyCA3ZpNGEZsvxPZLahYFrNC5dpxTk
Best Regards
Patrick Freitas
Hello @cogz ,
We haven’t heard from you for a while now, so it looks like my colleague’s code was able to help with your query.
Please feel free to re-open this ticket if needed.
kind regards,
Kasia