@freekmurze isset won't check to see if there is a variable set give a string you pass to it, rather you need to pass it an actual variable
>>> isset('video');
PHP Parse error: Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on line 1
>>> $video = 'test';
=> "test"
>>> isset($video);
=> true
>>> isset($video1);
=> false
I need something like
<input type="text" name="title" value="<?= oldInputOrExistingValue('title', isset($video) ? $video : null) =>">
function oldInputOrExistingValue($field, $model) {
return old($field, isset($model) ? $model->{$field} : null);
}
but where I pass the $model as a string in the view and not check again to see if I have the $video variable