I have a form that when user updates the status it should insert a new line in the Jobhistory_subform.
Code: Select all
function updatehisto() {
//Place the field data-prefixe that are marked for deletion in an array.
var subFormPrefixes = nuSubformArray('jobhistory_subform', true);
//Update the job status
var newValue = $('#jobstatuschange').val();
$('#job_status').val(newValue);
//Place a new line in the subform "jobhistory_subform" .
for( var index in subFormPrefixes) {
if($('#'+subFormPrefixes[index]+'jobhistory_visaid').val()==' '){
$('#'+subFormPrefixes[index]).checked=false;
$('#'+subFormPrefixes[index]+'jobhistory_visaid').val(newValue);
}
}
nuSaveForm();
}
Could you please advise?