Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
To integrate modules "Select2" + "editablefields" you need to replace this code
if ($this.find('input[type=text],input[type=checkbox],textarea,select').length == 1 || $this.find('input[type=radio] ').length > 1) {
with this
if ($this.find('input[type=text],input[type=checkbox],textarea,select').length == 1 || $this.find('select.use-select-2').length == 1 || $this.find('input[type=radio] ').length > 1) {
in the file "editablefields / editablefields.js".
Comment | File | Size | Author |
---|---|---|---|
#2 | editablefields--interation-select2.patch | 1.07 KB | yuraosn |
Comments
Comment #2
yuraosn CreditAttribution: yuraosn as a volunteer and commentedPATCH
Comment #3
joelpittetI don't plan on adding specific integrations into the code, it just makes for a mess to maintain. Technically that select should be satisfied by the first condition.
Comment #4
yuraosn CreditAttribution: yuraosn as a volunteer and commentedWhen the "Select2" module is turned on then your sample
if ($this.find('input[type=text],input[type=checkbox],textarea,select').length == 1 || $this.find('input[type=radio] ').length > 1) {
it returns the number 3 because The module "Select2" creates a "select" tag next to "checkbox" "text" and therefore the number is not equal to 1.
Please change the selection in the code or add what I wrote above, otherwise for the "Select2" module unfortunately does not work (