Support

Account

Home Forums General Issues If a field is empty (doesn\'t have any value), do something with plain Javascript Reply To: If a field is empty (doesn\'t have any value), do something with plain Javascript

  • 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.