I'm interested in modifying the validation function in PHPLIB for a select pulldown form. I want to make a database call to validate the option chosen in the select pulldown.
Looking in of_select.inc, I see the self_validate function. Is this where I need to make my database call? OR is there a better way to do this?
function self_validate($val) {
if (!$this->multiple && $this->valid_e) {
reset($this->options);
$o = current($this->options);
if ($val==$o["value"] || $val==$o) return $this->valid_e;
}
return false;
}
Thanks,
R