Skip to main content
Nintex Community Menu Bar

Set default value of lookup Control using Jquery

  • May 22, 2018
  • 3 replies
  • 30 views

Forum|alt.badge.img+1

I am trying to set up default value of list lookup control in Nintex 2016 Forms version 4.2 using Jquery.

I have tried below code but nothing happens on Nintex 2016.

NWF$("#" + drpdownid + " option:contains(" + valuetolookupandselect+")").attr("selected", true);

NWF$("#" + drpdownid).change();

3 replies

Forum|alt.badge.img+7
  • Nintex Partner
  • May 23, 2018
NWF.FormFiller.Events.RegisterAfterReady(function ()
{

NWF$('#' + drpdownid ).parent().find('select').find('option:contains("'+valuetolookupandselect+'")').attr("selected", true);

NWF$('#' + drpdownid ).parent().find('select').change();
});‍‍‍‍‍‍‍

Where valuetolookupandselect is option's text not value

And drpdownid is set as per the below picture:


Forum|alt.badge.img+10
  • May 2, 2019
It worked, Thanks, Was struggling with this on Nintex Forms 2.11.4.30

Forum|alt.badge.img+1

Hi does this work on Chrome / iPad?

I have a similar solution working on Windows/Chrome/IE but on iPad the default selection is blank on the drop down control.