Commit 9bd2d955 authored by John Punzalan's avatar John Punzalan

Update news form

parent 6a0fa12f
......@@ -251,7 +251,9 @@
$(".join_data_select").live('change', function(el){
var populate = $(this).data('populate');
var option_id = $(this).val();
var option_text = $(this).children(':selected').text();
$.ajax({
url: ajaxurl,
type: 'POST',
......@@ -263,6 +265,7 @@
var data = JSON.parse(response);
$(populate).find("option:gt(0)").remove();
$(populate).multiSelect('addOption', { value: option_id, text: option_text, index: 0 });
$.each(data.returned_data, function(i, d){
$(populate).multiSelect('addOption', { value: d.id, text: d.name, index: i });
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment