Skip to main content
Participant
October 10, 2024
Answered

Create a formula/Java script to autofill a field with specific text when there is a value in another

  • October 10, 2024
  • 1 reply
  • 588 views

I am looking to create a formula or JavaScript in a fillable PDF, to autofill a field with specific text (T20000) when a numerical figure is entered in a different field.  I have this in the Excel version of my document, but it is not transfering or translating well in the the PDF version.  

 

This is how it is on my Excel spreadsheet:

=IF(O13>0,"T20000","")

This topic has been closed for replies.
Correct answer PDF Automation Station

Enter the follow Validation script into the field that you will enter the number:

if(event.value>0)

{

this.getField("FieldName").value="T20000";

}

else

{

this.getField("FieldName").value="";

}

 

Change "FieldName" to the actual field name.

1 reply

PDF Automation Station
Community Expert
Community Expert
October 10, 2024

Enter the follow Validation script into the field that you will enter the number:

if(event.value>0)

{

this.getField("FieldName").value="T20000";

}

else

{

this.getField("FieldName").value="";

}

 

Change "FieldName" to the actual field name.

Participant
October 10, 2024

It worked!  Thank you so much!!!  My IT Dept couldn't even figure this out!