HELP making textfield required after checkbox is checked
i have been trying write javascript on pdf form allow me have field required if box has been checked. if can't done can me showing text in text field if checkbox checked. have looked everywhere example , still haven't found solution problem.
my statement needs use condition such as:
if previous name(checkbox) equal checked, execute script: name(textfield) display text "this field required"
can me?
hi.
go actions tab in properties of checkbox.
set "trigger" "mouseup".
set "select action" "run javascript" , hit "add..."
paste script , fill out names according fields.
//textfield name of textfield
f = "textfield";
// yes export value of checkbox
e = "yes";
tfield = this.getfield(f);
if (event.target.value == e) {
tfield.required = true;
}
else {
tfield.required = false;
}
torben.
More discussions in JavaScript
adobe
Comments
Post a Comment