Search

A site I'm having to build contains multiple forms, all of which have two email fields (Child & Guardian). I am trying to validate these two fields against one another to make sure that they do not match. Enter EventPreSaveFilter =)

I have created an extension that performs this extra validation. If emails match then I need to obviously write this out to the screen. Below is the code that I'm using for this. Now the emails are just being entered into a text field. So what should the type be. I have tried a few variations and haven't come up with anything.

$context['messages'][] = array(
  'TYPE?',
  FALSE,
  'unique error message'
);

I have gotten it to the point that the standard 'Entry encountered errors when saving' is shown, but my unique message isn't. Can anyone help me with this?

Thanks.

Your code should be correct. Just try to append an extra ?debug to the action of your form, so that when you submit it, the full xml (hopefully with your message) is shown.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details