On a new form, I'd like to set a default value on a lookup dropdown, this is what I have currently but doesn't seem to be working. Can you assist, please?
fd.spRendered(function(){
fd.field('OperatingHours').ready().then(function () {
//set Lookup field value once the field loads
fd.field('OperatingHours').value = '24x7';
});
});
You must know the item ID to set the lookup field value. For instance, the target item ID is 5 then you can use this code:
fd.spRendered(function() {
fd.field('OperatingHours').ready().then(function() {
//set Lookup field value once the field loads
fd.field('OperatingHours').value = 5;
});
});