mrisse
New member
Hello,
I didn't get the function dadabik_display_required_ to work.
I record security events. these can be different, e.g. phishing, virus or ddos. if i select virus, another input field should appear, in which i have to enter the name of the virus. If i select ddos, a field with affected ip addresses has to be filled. i tried this:
(method is the field with a list (select_single) of possible types, virusname is the field of the virus if the method was a virusinfection)
UPDATE:
I was able to select my function under "Custom display / required function" and the field disappeared. However, the field does not reappear when I select the appropriate method "virusinfection".
thank you
I didn't get the function dadabik_display_required_ to work.
I record security events. these can be different, e.g. phishing, virus or ddos. if i select virus, another input field should appear, in which i have to enter the name of the virus. If i select ddos, a field with affected ip addresses has to be filled. i tried this:
(method is the field with a list (select_single) of possible types, virusname is the field of the virus if the method was a virusinfection)
function dadabik_display_required_method_virusname ($params){
if ( $params['values']['method'] === 'virusinfection'){
$virusname['show'] = true;
$virusname['required'] = true;
}
else{
$virusname['show'] = false;
$virusname['required'] = false;
}
return $virusname;
}
UPDATE:
I was able to select my function under "Custom display / required function" and the field disappeared. However, the field does not reappear when I select the appropriate method "virusinfection".
thank you
Last edited: