cancel
Showing results for 
Search instead for 
Did you mean: 
ashishrastogi18
Nintex Newbie

Set default value of lookup Control using Jquery

Jump to solution

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();

Labels: (1)
0 Kudos
Reply
3 Replies
pwarrak
Nintex Newbie

Re: Set default value of lookup Control using Jquery

Jump to solution
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:

View solution in original post

Reply
sojanm
Nintex Newbie

Re: Set default value of lookup Control using Jquery

Jump to solution
It worked, Thanks, Was struggling with this on Nintex Forms 2.11.4.30
0 Kudos
Reply
Highlighted
ncundliffe
Nintex Newbie

Re: Set default value of lookup Control using Jquery

Jump to solution

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.

0 Kudos
Reply