You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script>
function updateAdmission(element) {
console.log(element);
var degree = element.value;
if (degree !== null && degree !== undefined && degree !== "") {
$.ajax({
url: '/backend/web/index.php?r=university/dependent-courses',
method: 'POST',
data: {
'degree': degree,
'university': "id ?>"
},
success: function(response) {
response = JSON.parse(response);
if(response.status == "success") {
var row = element.id.split('-')[1];
var select = $('#universityadmission-' + row + '-course_id');
select.empty();
var data = response.result;
for(var i = 0; i < data.length; i++) {
select.append( ''
+ data[i].name
+ '' );
}
}
},
error: function(){
console.log('error', arguments);
}
});
}
}
</script>
The text was updated successfully, but these errors were encountered:
devansh-gtu
changed the title
Cant save in data base using dynamic form in one model
Cant save in data in database using dynamic form in one model
Jan 30, 2023
Controller:
public function actionCreate()
{
form:
registerJsFile('@web/js/programs.js'); $this->registerJsFile('@web/libs/select2/select2.full.min.js'); $this->registerCssFile('@web/libs/select2/select2.min.css'); $year=[0=>' ',1=>'Janurary',3=>'Feburary',3=>'March',4=>'April',5=>'May',6=>'June',7=>'July',8=>'August',9=>'September',10=>'October',11=>'November',12=>'December']; ?>The text was updated successfully, but these errors were encountered: