help with php validation for a DBJOIN element

theboss

Member
I have a dropdown (zdtl_mp___ie_raw) that change from 0 to 1 when email list plugin is used.

After this I wish to avoid that user can change value of a (zdtl_mp___it11i) DBJOIN element, but this code is not correct.

PHP:
$ie='{zdtl_mp___ie_raw}';
$old=$origData["zdtl_mp___it11i"];
$new='{zdtl_mp___it11i}';
return $old != $new and ($ie=1) ;

because validation fails without changing data also.

At the end, can dropdown (zdtl_mp___ie_raw) element become readonly so user can't change it?

thanks
 
$ie is a string, comparison has to be == and as I understand it the logic is the otherway around, so try
return !(($old!=$new) and ($ie =='1'));


Gesendet mit Tapatalk
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top