Forums

Migrate Custom server side validation (CF4) to CF5

damconsulting 19 Apr, 2017
Hi, I've got a form made in CF4 where there is an 'email' field and 'retype_email' field. To verify that they are identical, I added a custom server side validation with this code:

<?php
    if ( $form->data['email'] != $form->data['retype_email'] ) {
      $form->validation_errors['email'] = "email doesn't match";
      return false;
    }
?>


I'm in the need to recreate this function with CF5 and I try to use an 'Event switcher': i copy/paste the code in 'On Success' but it doesn't work.
Any idea?
Thank you.
Dam
This topic is locked and no more replies can be posted.