Calculated Field - If field1 is not empty, then field 1, else allow entry


i'm oversimplifying let's have 2 text fields name1 , name2.

name2 calculated based on name1 , read - event.value=this.getfield("name1").value

 

how allow entry in name2 if name1 empty?

 

thanks help.

you need remove code custom calculation of name2 , enter following validation script of name1:

 

var name2 = this.getfield("name2");

if (event.value) {

     name2.readonly = true;

     name2.value = event.value;

} else name2.readonly = false;



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?