Copy link to clipboard
Copied
Good Morning,
I am hoping for assistance with the below scenario. Upon selection of name the 3 fields autopopulate:
The javascript I entered isn't working. I also have not entered a reset form code, is this necessary? Below is what I have attempted:
var PoistionTitle = "";
var PositionNo = "";
var ApproverID = "";
if ( event.value == "Hopkins, Rachael"){
PositionTitle = "PCS";
PositionNo = "123456";
AproverID = "1111111"
} else if ( event.value == "Perry, Mark"){
PositionTitle = "PCS";
PositionNo = "789123";
AproverID = "222222"
}
else if ( event.value == "Mitchell, Ellis"){
PositionTitle = "PCO";
PositionNo = "999999";
AproverID = "333333"
}
{
this.getField("PositionTitle").value = PositionTitle;
this.getField("PositionNo").value = PositionNo;
this.getField("ApproverID").value = ApproverID;
}
Any guidance would be greatly appreciated.
Copy link to clipboard
Copied
Where does you use the script?
Copy link to clipboard
Copied
I placed it in 'Document Javascript' in PDF
Copy link to clipboard
Copied
Use the script at validation of the dropdown.
Copy link to clipboard
Copied
Thank you. It is now auto populating the position title and position no box but not the approver ID. Have I missed something with the code?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more