Jennifer
Scholar

Uncaught TypeError: Cannot read property 'options' of null

Hi 🙂

 

I've been trying to fix a bug for hours, but I just can't figure out what the problem is.

 

I get the following error:

 

error.PNG

 

It refers to this codepart:

 

function addOnChangeRequestor() {
    NWF.FormFiller.Events.RegisterAfterReady(function () {
        var ins1 = new NF.PeoplePickerApi("#" + varRequestor);
        ins1.added(function () { onChangeRequestor() });
    });
}

 

Specifically to:

 

ins1.added

 

I made sure that varRequestor does exist in the Nintex Form.

The function above is used in the document ready function:

 

NWF$(document).ready(function () {

    NWF$(".cssHidden").hide();

    if (isNewDoc) {
        loadNewDoc();

        loadRequestorsInfo();
        addOnChangeRequestor();

    } else {        
        loadExistingDoc();
        addOnChangeRequestor();
    }
    
    NWF$("body").click(onClickForm);

});

 

The exact code is also used on another application and it works fine there.

 

I found another thread regarding this on here, but the answer doesn't work for me.

 

How can one fix this bug? Any help is appreciated!

0 Kudos
Reply