Hi, I have a list lookup control in the list. I want that when I open the edit form the value if this column will be pre-selected with the value already in the list for this item. But I am not able to implement this. I tried the Java Script for this as well. Please suggest me how to do this.
If I understood you correctly, you want your list lookup control to have a preselected value?! But I can't get it to work either.
$(".listlookup option[value='14']").prop("selected", true);
If I do a alert($(".listlookup").val()); afterwards, I get the correct result ("14"). But the control is still showing "Please select a value".
Maybe some NintexForm-JS-Pro can have a look at this. For a regular dropdown, this should be working (see Edit fiddle - JSFiddle ).
var yourText = "your text to select";
NWF$("#" + myLookupID + " option:contains(" + yourText +")").attr("selected", true);
Hope that helps.
If i put that code into a function and execute it on a button click, it works. But in the RegisterAfterReady event it doesn't (seems like Christophe Raucq has a point here).
Does anyone have an idea on this issue?