steffan
1
Hi!
Every time I use an upload field it needs to be filled in. Even though I don’t put it as required, the system shows an error as seen below:
I want to give the user the option to send a file or not. With this error I can only leave it as mandatory.
Does anyone know how to fix?
RadSystems v5.0.3
@willvin do you know how to solve this?
you will have to manually edit the file giving the error yourself.
Replace
$modeldata['image'] = $fileInfo['filepath'];
with
if($fileInfo['filepath']) {
$modeldata['image'] = $fileInfo['filepath'];
}
or
if(isset($fileInfo['filepath'])) {
$modeldata['image'] = $fileInfo['filepath'];
}