I am designing a form in Adobe Pro DC in which I have 4 text fields (Numfield1, Numfield2, Namefield1 and Namefield2) if these fields match or if the difference is 0 (Numfield1 minus Numfield2), I want Namefield2 to autofill the value of Namefield1.
I have been trying with the below code, please note i'm not a programmer and my skillset is limited to finding scripts and customising it for my purpose, hence this script might be way off the mark.
var A = this.getField("Numfield1").value; // the value of field A;
var B = this.getField("Numfield2").value; // the value of field B;
var C = A - B; // the value of field A minus the value of field B;