I have encountered a following problem while using dropkick plugin for jQuery. When I add a selectfield and give it a name with square brackets, i.e orders[], the whole select item dissappears. I don’t know what to do, I need to use array of selects and I’d like to keep on using dropkick 🙂
Any ideas how to solve this problem?
Cheers 🙂
This is likely down to the plugin not correctly handling the square brackets within the name of your select.
I’ll confirm this shortly, however I assume it is trying to select another element or elements using the
nameof your select, which includes square brackets.As a result, jQuery will think your trying to find a select with a parameter.
Update
As promised, this is the error I get when trying to replicate your problem:
This is because on line 82, it is trying to get the ID or Name.
A solution, set a unique ID for each of your select elements and it should avoid using the Name attribute.
See http://jsfiddle.net/gRoberts/mw3Xg/ for an example which has a name of
orders[]