if script into pdf text box

Previous topic - Next topic

Sykelig

Hi, I try to make a "if" into the pdf text box. I have the following code :

var a = this.getField("Manista1").value;
if (a = "Phy")
this.getField("test3").value = "1"
else if (a = "Agi")
this.getField("test3").value = "2"
else if (a = "Per")
this.getField("test3").value = "3"
else
this.getField("test3").value = " ";


Into the "Manista1", it's a list with 4 possiblity : nothing, Phy, Agi or Per. The pdf box name test3 is the box with the script inside.

I hope you understand me. Thanks you very much.