Copy link to clipboard
Copied
My form was working perfectly until I added some script to hide fields based on a button... now I get an error
JavaScript Debugger (window) says:
TypeError: f is null
1051:byteCodeTool
Any ideas?
In some code somewhere in the form, it's attempting to assign a field object to the variable f, for example:
var f = getField("Text1");
but the field ("Text1") does not exist. It could be that it was deleted or renamed. You're going to have to find the code and determine which field name it's using, and go from there.
Copy link to clipboard
Copied
Check the field names.
Copy link to clipboard
Copied
For what? Please explain
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Compare the field names in your code with the field names in the form.
Copy link to clipboard
Copied
I wrote this for approx. 20 fields to hide when check box is
selected – naming all the fields starting with “Redo.” It's the only one I have I think...
var nHide =
event.target.isBoxChecked(0)?display.visible:display.hidden;
The only other one I have is a purchased cascade script from
MVP which appeared to be working fine prior to adding the above…
Both actually work but the Debugger error window keeps
coming up every time anything is slected?
Copy link to clipboard
Copied
I did delete a field that had script in it though... would that be causing the issue?
Copy link to clipboard
Copied
Where did you set the variable f?
Copy link to clipboard
Copied
I'm not sure what that means? ... but the issue appears to be in the cascade drop lists
Copy link to clipboard
Copied
In some code somewhere in the form, it's attempting to assign a field object to the variable f, for example:
var f = getField("Text1");
but the field ("Text1") does not exist. It could be that it was deleted or renamed. You're going to have to find the code and determine which field name it's using, and go from there.