In a Yii2 form I nee to trigger some code when things changed on a field I’m using onchange to do this
This is the kind of thing I need :
->dropDownList(Customer::getDataList(),
array('prompt'=>Yii::t('app','select.customer'),
'onchange'=>'$.post("index.php?
r=comptacust/selectedlists&id='.'"+$(this).val(), function(data) { $(
"select#invoiceheader-comptacust_id" ).html(data) })',
'onchange'=>'$.post("index.php?
r=pmtmode/selectedlists&id='.'"+$(this).val(), function(data) { $(
"select#invoiceheader-pmtmode_id" ).html(data) })',
'onchange'=>'$.post("index.php?
r=pmtcondition/selectedlists&id='.'"+$(this).val(), function(data) { $(
"select#invoiceheader-pmtcondition_id" ).html(data) })', ));
But the post function does work only 1 time (for pmtcondition)
What do I need to do so that I can do the 3 posts ?
Any help would be nice