Basically, what I want to do is hide some unused fields if the first field (a text field) is empty. If they put something into the text field, the other fields show up again. I know this trick <input type="text" name="attr_test" /> <input type="checkbox" name="attr_test" value="test" /> <input type="checkbox" name="attr_test" value="test1" /> <input type="checkbox" name="attr_test" value="test2" /> Where one of the associated checkboxes get checked if any of the three tested values is entered into the text box. But I want to test for an empty, null, or blank string.  Unfortunatly,  <input type="text" name="attr_test" placeholder="Its empty" /> <input type="checkbox" name="attr_test" value="" /> Does not work. The placeholder value shows up, but the box will never check.  Is there any way to test for an empty text box that css can recognize?