How to pass a value to a list lookup since last update

  • 6 July 2017
  • 1 reply
  • 2 views

Badge +4

HI,

I have inherited a form where a list lookup field was being pre-populated based on a value in the URL. Previously it had been doing this with some Javascript but since the last update that doesn't work any more.

NWF.FormFiller.Events.RegisterAfterReady(function () {
setLookupFields();
});
 
function setLookupFields() {
if (document.location.pathname.indexOf("/NewForm.aspx")>1) {
var varParent = NWF$("#" + varAssuranceProgramme).val();
var varNewID = NWF$("#" + varProgrammeIDNew).val();
varDropDown = ko.dataFor(NWF$("#" + varAssuranceProgramme)[0]);
varDropDown.initialValue = varNewID;
}
}

But since the update to 2.10.0 this javascript (among others) doesn't work any more. Is there any other way to pass the value to the list lookup via the NewForm URL?


Reply