beforesave only is value is true

Hello all,
I would like to save a record only if the value in an other table doesn't exist.
So something like
Can't think of a way of doing this.
Could't find it in the search.
Thanks PolderBoy
I would like to save a record only if the value in an other table doesn't exist.
So something like
- Code: Select all
function beforesave(&$record)
{
if (value_from_other_table is true)
{
save
} else {
do_nothing
}
}
Can't think of a way of doing this.
Could't find it in the search.
Thanks PolderBoy