Starting testing of V3.6
Getting this error for forms: Cannot read property ‘type’ of undefined
In …/dhtmlxForm/codebase/dhtmlxform.js
Line 20
Worked fine in V3.5
Anyone else have this error?
Starting testing of V3.6
Getting this error for forms: Cannot read property ‘type’ of undefined
In …/dhtmlxForm/codebase/dhtmlxform.js
Line 20
Worked fine in V3.5
Anyone else have this error?
Resolved. On too many comma’s in the form definition:
…list: [,{type: “checkbox”, label:…}]…
V3.5 and earlier overlooked that sin, V3.6 is a bit more pickier
Hope this post will help someone else.
Hi,
I just switched to v3.6, and having the same issues on my forms, i dont have any extras as i checked twice, So how did you fix this???
Thank you
Hi, kashifwebpro
Your issue can be similar to the first: check all the possible syntactic mistakes in your code and if you haven’t such - provide us direct link or completed demo to reproduce your issue
docs.dhtmlx.com/doku.php?id=othe … leted_demo
hi to all
for those who want to use any count of commas and other into your code
(like [{type: “newcolumn”},{type:“input”},] ):
fix for dhtmlxform.js (src):
line ~344,
this._prepareItem = function(data, pos) {
var type = (data.type||"");
replace with:
var type = (data!=null && data.type!=null ? data.type : “”);
fix for dhtmlx.js:
open dhtmlx.js, using “search” find <c=a.type||""> (do not unclude < > into search),
part of code should be like:
this._prepareItem=function(a,b){var c=a.type||"";…
you need to replace
var c=a.type||"";
with:
var c=(a!=null&&a.type!=null?a.type:"");
if anyone afraid to change dhtmlx.js - we can help, as usual, just send file to our support team support@dhtmlx.com (of course, include link to this thread). please do not share pro version here
hope this will help
Hi Andrei
Would be nice if you can put the fixed (standard) dhtmlx.js file to the forum.
I don’t wanna change the file because it’s not so easy for me…
Thanks a lot !
Franky
Hi Andrei,
Thanks, I had fixed it already, the problem was with my code, found some extra commas,
Now its working fine…