I have set lookup default field value(from query string parameter) in my nintex forms as below and it was working fine.
NWF$(document).ready(function () {
// here I was setting value "1" which is comes from query string
// It was working fine before update
NWF$("#" + ctrlID_ParentRequestDDL).val("1");
});
Now In my SP server I have installed latest Nintex Forms 2013 update i.e. 2.8.1.0, suddenly it's stopped working.
I have tried to find reason and I found that now in latest update, Nintex Forms uses Knockout JS to bind lookup field dropdown values e.g.,
<select title="" class="nf-lookup nf-ignore-getvalue nf-associated-control" id="ctl00_ctl39_g_c7140103_9f24_45a2_bf80_27a46acbea34_ctl00_ListForm2_formFiller_FormView_ctl118_lookupfa176a38_9bc4_4605_a0bc_2b9f7308ff55_Lookup" style="width: 100%;" formcontrolid="366ae762-ebb7-4480-baba-de982e7e361f" data-use-attribute-as-value="data-nfChoiceValue" data-bind="css: cssClass, options: lookupItems, optionsValue: 'id', optionsText: 'title', attr:{ title: helpText, id: id, disabled: !enabled(), formcontrolid: formcontrolid }, optionsAfterRender: setOptionTitle, value: selectedItem, event: { change: dropdownlistChanged }"><option title="Please select a value..." value="" data-nfChoiceValue="">Please select a value...</option><option title="1 - 1" value="1" data-nfChoiceValue="1;#1 - 1">1 - 1</option></select>
After update, it is loading dropdown value(by querying into lookup list) after document.ready function and till that time It is adding only one option into drop down i.e. "Loading..."
Currently in document ready function, I am only getting only one option that is "Loading...". and I have tried "NWF.FormFiller.Events.RegisterAfterReady" event but in that event also I am getting only one option i.e. "Loading".
So Now How can I achieve this functionality?
Any help is really appreciated.