The following creates a dropdown picklist and a comment box, the picklist is empty and I cant figure out where to put the options inside the script
$(document).ready(function(){
var withdrawalCharLimit = 600;
buildWithdrawalDropdown();
$("#withdrawalCharRemainingGWU").text(withdrawalCharLimit-$("#withdrawalCommentsGWU").val().length);
$("#withdrawalReasonGWU").change(function() {
if($("#withdrawalCommentsGWU").val()==""){
$("#taComments").val($("#withdrawalReasonGWU").val());
} else {
$("#taComments").val($("#withdrawalReasonGWU").val()+". Detail: "+$("#withdrawalCommentsGWU").val());
}
});
$("#withdrawalCommentsGWU").keyup(function(){
if($("#withdrawalCommentsGWU").val()==""){
$("#taComments").val($("#withdrawalReasonGWU").val());
} else {
$("#taComments").val($("#withdrawalReasonGWU").val()+". Detail: "+$("#withdrawalCommentsGWU").val());
}
$("#withdrawalCharRemainingGWU").text(withdrawalCharLimit-$("#withdrawalCommentsGWU").val().length);
});
});
function buildWithdrawalDropdown(){
var withdrawalSelect = $("<select class='form-control' id='withdrawalReasonGWU'></select>").insertBefore("#taComments");
var withdrawalComments = $("<label for='withdrawalCommentsGWU'>Additional Comments (optional):</label><textarea maxlength='600' class='form-control' id='withdrawalCommentsGWU'>")}
The list looked like this how the options should load