In a CMS-constructed page, there are two forms. Only the first form's fields have working floating labels. None of the fields have duplicate IDs. When I comment out the code that generates the first form, leaving the second untouched, its labels begin to work.
There is a console error, but it doesn't change when I remove the first form:
floatingFormLabels.min.js:formatted:1 jQuery.Deferred exception: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined
at o._isFloated (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:3701:922)
at o._init (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:3701:498)
at new o (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:3701:426)
at HTMLDivElement.<anonymous> (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:3701:1407)
at Function.each (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:5203:19)
at jQuery.fn.init.each (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:5038:17)
at jQuery.fn.init.e.fn.<computed> [as floatingFormLabels] (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:3701:1309)
at HTMLDocument.<anonymous> (http://localhost:3000/assets/js/main.js?id=093271e6e5c564f9fa41:592:21)
at mightThrow (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:8393:29)
at process (http://localhost:3000/assets/js/vendor.js?id=b162ccd411517d2264b1:8461:12) undefined
jQuery.Deferred.exceptionHook @ floatingFormLabels.min.js:formatted:1
process @ floatingFormLabels.min.js:formatted:1
setTimeout (async)
(anonymous) @ floatingFormLabels.min.js:formatted:1
fire @ floatingFormLabels.min.js:formatted:1
fireWith @ floatingFormLabels.min.js:formatted:1
fire @ floatingFormLabels.min.js:formatted:1
fire @ floatingFormLabels.min.js:formatted:1
fireWith @ floatingFormLabels.min.js:formatted:1
ready @ floatingFormLabels.min.js:formatted:1
completed @ floatingFormLabels.min.js:formatted:1
floatingFormLabels.min.js:formatted:1 Uncaught TypeError: Cannot read property 'length' of undefined
at o._isFloated (floatingFormLabels.min.js:formatted:1)
at o._init (floatingFormLabels.min.js:formatted:1)
at new o (floatingFormLabels.min.js:formatted:1)
at HTMLDivElement.<anonymous> (floatingFormLabels.min.js:formatted:1)
at Function.each (floatingFormLabels.min.js:formatted:1)
at jQuery.fn.init.each (floatingFormLabels.min.js:formatted:1)
at jQuery.fn.init.e.fn.<computed> [as floatingFormLabels] (floatingFormLabels.min.js:formatted:1)
at HTMLDocument.<anonymous> (main.js:576)
at mightThrow (floatingFormLabels.min.js:formatted:1)
at process (floatingFormLabels.min.js:formatted:1)
In a CMS-constructed page, there are two forms. Only the first form's fields have working floating labels. None of the fields have duplicate IDs. When I comment out the code that generates the first form, leaving the second untouched, its labels begin to work.
Here's the code:
There is a console error, but it doesn't change when I remove the first form: