unclecheese / silverstripe-display-logic

The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior.
BSD 3-Clause "New" or "Revised" License
74 stars 71 forks source link

Fixed error with field names that contained [] #37

Closed Zauberfisch closed 9 years ago

Zauberfisch commented 9 years ago

values containing square brackets in queries for document.querySelectorAll() have to be escaped in order to work. (This is because querySelectorAll() / jQuery supports attribute selectors such as '[name=foo]', a query for the ID 'foo[bar]' would become document.querySelectorAll('#foo[bar]') which means: "get all elements with the ID 'foo' and the attribute 'bar'.)