Can someone assist me with this issue I am having in my code?
I have a Django template variable {% clients_list %}
I need to populate multiple select boxes with the same prefixes.
This is the code snippet I currently have:
$(document).ready(function(){
for (i=1; i<=30; i++){
for(j=0; j<=clients_list.length - 1; j++){
$('#client'+i).append($('<option>')
.text(clients_list[j])
.attr('value', clients_list[j]));
}
}
});
Unfortunately, I am encountering the following error message:
ReferenceError: clients_list is not defined
I would greatly appreciate any assistance with resolving this. Thank you!