I added confirm id field to the form and went to the edit tab> then to the advance tab> and entered this:
<script type="text/javascript"> var fieldId = "enter here the id of the first field"; var confirmFieldId = "enter here the id of the confirmation field"; wFORMS.behaviors.validation.messages['isIdentical'] = "The values don't match.";
// leave the rest as is. wFORMS.behaviors.validation.rules['isIdentical'] = { selector: "#"+fieldId, check: function(element) { var c=document.getElementById(confirmFieldId); if(element.value!=c.value) { return false; } return true; }}; </script>
The code you listed above needs to go into your Custom Code block, that is in the advanced tab of your form's root element (the form title). Click on the form's title in the formbuilder, then go to 'advanced', custom code block and paste in:
<script type="text/javascript"> var fieldId = "enter here the id of the first field"; var confirmFieldId = "enter here the id of the confirmation field"; wFORMS.behaviors.validation.messages['isIdentical'] = "The values don't match.";
// leave the rest as is. wFORMS.behaviors.validation.rules['isIdentical'] = { selector: "#"+fieldId, check: function(element) { var c=document.getElementById(confirmFieldId); if(element.value!=c.value) { return false; } return true; }}; </script>
Then go back to this code and replace the strings: "enter here the id of the first field" and "enter here the id of the confirmation field" with the values for the fields found in your html source code, which might be something like: "tfa_Email" "tfa_ConfirmYourEma"
I added this code to my form to confirm that the user had entered the same e-mail address, but nothing seems to happen. Does this code only get invoked if I have a professional plan with connectors configured?