Pass Editor field name to function

Pass Editor field name to function

peterbrownepeterbrowne Posts: 314Questions: 54Answers: 0
edited August 2022 in Editor

I have a $.getJSON function used to populate a select list:

        var unit_groups = [];   
        $.getJSON("program_data/get_unit_groups.php", function(data) {
            var option = {};
            $.each(data, function(i,e) {
                option.label = e.text;
                option.value =;
                option = {};

I now want to pass the value of an Editor field to that function. The field name is program_outcome.program_outcome

How would I do that?


  • rf1234rf1234 Posts: 2,817Questions: 85Answers: 406
    edited August 2022


    Looks like Editor is a global variable in your code anyway. So no need to pass the field value.

Sign In or Register to comment.