yii2-dynamicform icon indicating copy to clipboard operation
yii2-dynamicform copied to clipboard

Select 2 and DepDrop widgets not working

Open surendiranganesan opened this issue 9 years ago • 10 comments

Hello wbraganca,

First of all thank you for your wonderful widget.

I am using both select 2 and DepDrop in my active form whenever I clicked on add button i was getting the same regex issue which is already raised in the issues list [ no:37].

In that you have added fix to that ticket.I have updated the fix in my end where my regex issue is not coming but still the depdrop is not working .

  1. select2 plugin events are not adding to dynamically added select 2 fields.
  2. Depdrop is not working and it is having weird issue in the new fix that the dependency drop down ajax call is keep on hitting from the moment when i change the parent dropdown value.

Kindly help me on this.

Any help is highly appreciated.

Regards,

surendiranganesan avatar Jun 04 '15 08:06 surendiranganesan

proposed fix is working on my site as well

cloudcaptain avatar Jun 22 '15 01:06 cloudcaptain

proposed fix doesn't works for me

epulgaron avatar Nov 13 '15 18:11 epulgaron

doesn't works for me

mohdbashir avatar Jan 05 '16 10:01 mohdbashir

dynamic-input

mohdbashir avatar Jan 05 '16 10:01 mohdbashir

Fix only solve for Select2, not solving issue of DepDrop.

roycefanproxy avatar Oct 26 '16 16:10 roycefanproxy

I am also trying to use select2 and depdrop together. The first row works fine. But from the next row, getting the following error. Anyone came across this? error_5

tanmay20 avatar Nov 07 '16 03:11 tanmay20

@tanmay20 did you solve that?

mtangoo avatar Jan 13 '17 20:01 mtangoo

@tanmay20 I also encountered that issue yesterday. I tried to find another way. Did you solve that?

gemarkalmacen avatar Mar 07 '17 01:03 gemarkalmacen

The fix above helped me: #49 I did not want to change the code of wbraganca, so an update wont affect my changes and added following JS code into the form:

var initSelect2DropStyle = function(id, kvClose, ev){
	initS2Open(id, kvClose, ev);
};

var initSelect2Loading = function(id, ev){
	initS2Loading(id, ev);
};

Hope this helps :)

raphaelM-sudo avatar Mar 26 '17 23:03 raphaelM-sudo

The fix above helped me: #49 I did not want to change the code of wbraganca, so an update wont affect my changes and added following JS code into the form:

var initSelect2DropStyle = function(id, kvClose, ev){
	initS2Open(id, kvClose, ev);
};

var initSelect2Loading = function(id, ev){
	initS2Loading(id, ev);
};

Hope this helps :)

Thanks for the direction, maybe the method needs to change because of the version update.

wbraganca/yii2-dynamicform => v2.0.3

kartik-v/yii2-widget-select2 => dev-master f74f2cf

var initSelect2DropStyle = function(id){
    // initS2Open(id, kvClose, ev);
    initS2ToggleAll(id);
};

var initSelect2Loading = function(id, ev){
    initS2Loading(id, ev);
};

harusakura924 avatar Jan 09 '23 06:01 harusakura924