NWF.FormFiller.Events.RegisterAfterReady(function () {var defaultTeam = NWF$(\#\" + ddlFavTeam).val();if (defaultTeam == '0') {NWF$(\"#\" + ddlFavTeam).val('1');}}); not able to set the lookup dropdown value with the id of the item on form load"

  • 28 October 2015
  • 1 reply
  • 1 view

Badge +6

NWF.FormFiller.Events.RegisterAfterReady(function () {var defaultTeam = NWF$("#" + ddlFavTeam).val();if (defaultTeam == '0') {NWF$("#" + ddlFavTeam).val('1');}}); not able to set the lookup dropdown value with the id of the item on form load. tried the above code to set the lookup value but not able to set the value


1 reply

Badge +6

I have tried the below code but its not working for me

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

setTimeout(function(){

var defaultTeam =
NWF$("#" +ddlTeam).val();

if (defaultTeam=='0') {

NWF$("#"
+ddlTeam).val('1');

}

},1000);

});

Reply