TypeError: Cannot read property 'split' of undefined

2153
3
Jump to solution
04-04-2019 09:54 AM
MikeOnzay
Occasional Contributor III

I created a survey in Survey123 Connect (v3.3.51). Nothing complex. Single choice dropdowns. Text boxes. It has a static image in a note. Works fine in the app on Windows and iOS. When I try to preview it in the either Chrome or IE (not Edge) I see:

Error: Initializing form...

  • TypeError: Cannot read property 'split' of undefined

In FireFox I see:

Error: Initializing form...

  • TypeError: r.children(...).attr(...) is undefined

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
BrandonArmstrong
Esri Regular Contributor

After testing with the the XLSForm that you provided via email, it appears that the error is being caused by the last question in your survey which is a 'note' type field with multiline appearance.  As notes are read only, and you do not have a calculation that is pushing text to it, I'm wondering if you are meaning to have this question as type 'text'?

If you remove this question, or, change it to type 'text', the survey should load without error.  

Please try this out and let me know your results.

Best,

Brandon

View solution in original post

3 Replies
BrandonArmstrong
Esri Regular Contributor

Hi Mike,

Please upload your XLSForm to this thread or send over to barmstrong at esri.com so that I can investigate the behavior.

Thanks,

Brandon

0 Kudos
BrandonArmstrong
Esri Regular Contributor

After testing with the the XLSForm that you provided via email, it appears that the error is being caused by the last question in your survey which is a 'note' type field with multiline appearance.  As notes are read only, and you do not have a calculation that is pushing text to it, I'm wondering if you are meaning to have this question as type 'text'?

If you remove this question, or, change it to type 'text', the survey should load without error.  

Please try this out and let me know your results.

Best,

Brandon

MikeOnzay
Occasional Contributor III

Agh! It was not my intention to use a note field. Once I changed it to a text field it worked. Thanks for catching my mistake.