Javascript for custom computed fields not retained
I am trying to use custom calculation script using javascript to populate a field on the PDF. I select "Custom calculation script", then press the "Edit" button, enter the code below into the editor, then click the "OK" button. The problem is that the code is never retained and the radio button is reset to "Value is not calculated" on the fields "Calculate" tab.
The code I am using is:
var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); var yyyy = today.getFullYear();
this.getfield("RFP Number").value = "HCF"+yyyy+mm+dd;
I am using Acrobat (64-bit), version 24.005.20320
Does anyone have any clue why this is happening and code is not retained?



