Adobe Form Code no longer works when I change a field name in code
I have created a large code (thanks to help from people on this forum) and it has worked perfectly for what I have needed but I am having some trouble with it right now.
When I change a field name within the code, it usually isn't a problem until now. I have changed 'Vantagequote' to 'Vantageinstallationprice' (B.value) and suddenly the whole code no longer works...as in it stops populating all the other fields. If I change 'Logic' or any of the other field name, it does not affect the code's function, even with or without a field of the same name within the text. When I change the Vantage field name, if the name does NOT match the target field name, then the code WORKS. When the field name in the code is EXACTLY the same name as the target field name, the whole code stops working.
The code was a copy from another document (copied the dropdown field over to the new document without issue) but I have made changes to it now, which has worked until now., including changing field names and data in the code. I did try to put a field in with the original name to try and make it work but the same problem happened. It is only happening with 'Vantage...'
I have also tried deleting and replacing the target field but it didn't work. I have no clue as to what is going on.
Here is a part of the code so that you get the idea of what it is. The code is in order of calcuation on the form and I want to keep this code's structure for I will be teaching a non-technical person how to change prices in it when needed. I have found that this works well for others to read and understand.
Any help would be greatly appreciated.
var S = this.getField("Digtype");
var L = this.getField("Minidigperday");
var E = this.getField("Miniminidigperday");
var V = this.getField("Logic");
var B = this.getField("Vantageinstallationprice");
var A = this.getField("Beamsizetotal");
var C = this.getField("PoolSize1");
var D = this.getField("Tons");
var F = this.getField("Standardmachineprice");
if(event.value == "Compass Plunge 2.8m x 2.13m"){
S.value = "Standard 3-ton Machine";
F.value = 1800;
L.value = 1;
E.value = 1;
V.value = 1500;
B.value = 2800;
C.value = "2.8m x 2.13m";
D.value = 50;
A.value = 2450;}
else if(event.value == "Compass Plunge 3.8m x 2.13m"){
S.value = "Standard 3-ton Machine";
F.value = 1800;
L.value = 1;
E.value = 1;
V.value = 1500;
B.value = 2800;
C.value = "3.8m x 2.13m";
D.value = 50;
A.value = 2450;}
//etc.
