mini998
(Ima Silva)
December 3, 2013, 11:38pm
1
Hi,
I need to have three drop down lists on a page ,linked to the same model
List 1 - Populated by ‘name’ field from model
List 2 - Populated by ‘name’ field from model minus the selection from List 1
List 3 - Populated by ‘name’ field from model minus the selection from List 1 and selection from List 2
thanks in advance
h3rm
December 4, 2013, 2:17am
2
You need to use Ajax.
this is the good sample about your question:
http://www.yiiframework.com/wiki/429/an-easy-solution-for-dependent-dropdownlist-using-ajax/
City name will displayed after Region chosen.
mini998
(Ima Silva)
December 4, 2013, 8:25am
3
thanks
I already checked that tutorial , but my issue is when it come to third dropdown, How do I pass both List 1 & List 2 values when generating 3rd dropdown?
h3rm
December 4, 2013, 9:15am
4
you can send paremeter:
'data'=>array(
'dropdown_1'=>'js:this.value',
'dropdown_2'=>'js:$("#cbo2").val()'
),