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".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yuraosn created an issue. See original summary.

yuraosn’s picture

joelpittet’s picture

I 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.

yuraosn’s picture

When 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 (