How to clear content of for field when set to hidden
I have a form where fields completed a basic business card. The fields get pulled find but has the option to place 2 emails. With “Email2” to hidden when “Email” was not used. However, if someone places something in “Email2” but then clears “Email”, “Email2” breaks the long script already in place.
I want the “Email2” field to clear itself when its set to hidden. Is this Possible?
This is what ive already started below:
var one = this.getField("Email");
var two = this.getField("Email2");
if (one.value!=""){
two.display=display.visible;
};
if (one.value==""){
two.display=display.hidden;
};
