83 Posts
squareweb
6 years ago
Topic

Hi,

I've managed to copy and change the ajax-validate-plugin such that it will check two form-fields against two corresponding database-fields in one table.

A simple sql count(*) returns 0 or more rows. If > 0 => error-label should be shown and save should be prevented...

SQL-execution works fine and field-logic works also (formfield1 = dbfield1 AND formfield2 = dbfield2).However the content-item always gets saved (created) and no error is thrown...

I can provide current plugin if desired.

This plugin is handy in checking existence before storing M=>N relation-types.

Thanks in advance

Mark

Get a VIP membership
83 Posts
squareweb
6 years ago
0
Level 1

Hi,

I've found out that the field on which this plugin works can't be empty... if not empty it works fine...

Also plugin doesn't work on selectbox-dynamic. I'll try to apply a work-around. Until now it works.

Case closed

Get a VIP membership