AnsweredAssumed Answered

Default value DropDown

Question asked by marp on Nov 14, 2016
Latest reply on Jan 4, 2018 by furstlars

When I open a new form, I want to set the default value of my dropdown to the first value of a list (indexid = 1) and it should also be saved ( as long as the user doesnt change the value) when the user clicks on the "Save" button. I tried it with code below, but nothing happened Nintex Form version 2.9.3.1.

 

dlookupID is the JavaScript variable name of my dropdown.

 

NWF.FormFiller.Events.RegisterAfterReady(function () {

 

setLookupFields();

 

});

 

 

function setLookupFields() {

 

         // Getting view model of my lookup field dropdown control

 

   vmForApplication = ko.dataFor(NWF$("#" + dlookupID)[0]);

 

   // Setting value to drop down

 

      vmForApplication.initialValue  = "1";

 

}

Outcomes