sifa786
(Ffelaar)
1
Hi,
In my view I have 3 dropdownlists. 2 of the lists need to be populated after the user selects a value in the first.
<?php
echo $form->dropDownListRow($model, 'VesselFeatureID',
CHtml::listData(Vesselfeature::model()->findAll(), 'VesselFeatureID', 'VesselFeatureDescription'),
array('class' => 'span5',
'empty'=>'',
'ajax' => array('type'=>'POST',
'url'=>CController::createUrl('FillAllowableValues'),
'update'=>'#VesselFeatureAllowableValueID',
),
)
);
?>
How do I modify the above to also update the 3rd dropdown?
I cannot trigger the change on the 2nd dropdown, since it might contain no values.
ballu
(Sonu Dhindsa)
2
Are you want to get the 3rd dropdown value on change of 2nd dropdown? if so then you can get this by doing same as
<?php
echo $form->dropDownListRow($model, 'VesselFeatureAllowableValue',
array(),
array('class' => 'span5',
'empty'=>'',
'ajax' => array('type'=>'POST',
'url'=>CController::createUrl('FillAllowableValuesFor3rdDropdown'),
'update'=>'#VesselFeatureAllowableValueIDOf3rdDropdown',
),
)
);
?>