It is for Adobe Acrobat Javascript:
I'm trying this code but failed for two days. I'm trying to put this code in textField Calculate Tab and in Custom Calculation Script.
Any help will be appreciated.
And let me also tell you what I'm trying to achieve. I want that if user put any value in textField it check the value if it is "Yes" it should mark the check box Checked. and if it is No it will do nothing or uncheck the checkbox.
var subText= "Subcontractor Yes or No";
var cTitle = "Document Data for Stamp";
if(event.source.forReal && (event.source.stampName =="#New123"))
{
event.value = app.response(subText , cTitle);
if(this.getField("subtext").value =="Yes")
{
this.getField("SubCheckbox").value="On";
}
if(this.getField("subtext").value =="No")
{
this.getField("Subcheckbox").value="Off";
}
}
I found the solution and it worked for me perfectly.