Let’s say it’s a video field. Or an image field. Or a Wysiwyg editor. I actually have all of them, but my main concern is how to implement in code that the field might be empty. PHP or JS. I don’t mind.
The screenshot will help.
Thanks for your time.
I don’t mind using PHP, i am just not familiar with the language.
Could you provide me with a code snippet?
I am imagining something like this in JS:
if( field_name = ‘ ‘){
document.querySelector(‘.video–title’).classList.add(‘hidden’)
}
———-
CSS
.hidden {
display:none;}
———–
For the JS part, I don’t know how to implement that the field returns nothing. Probably the way i wrote the code is wrong.
I would appreciate your help, even in PHP.