I’ve added a Javascript condition, but the field still shows all the time.

Check your if statements to ensure you have == where required. For example: if (condition = true) { result = true; } should be if (condition == true) { result = true; }