rszabo

Setting a default value for a dropdown

Discussion created by rszabo on Apr 14, 2016
Latest reply on Jun 1, 2016 by rszabo

Sometimes I need a cross-site lookup (which is possible with the Nintex Lookup control) to select a value. My Filtering will always result just one value or the first one should fit. We need to set the first option from the list as selected. 

 

Lookup control settings (Advanced section):

  • Store Client ID in JavaScript variable
  • Name it. Example: varMyLookupField

Custom Javascript to Form Settings:

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

var myLookupDropdownControl = NWF$('#' + varMyLookupField);

myLookupDropdownControl.change(function(){

NWF$('#' + varMyLookupField).val('1')

});

} );

Outcomes