harryr
Nintex Newbie

Re: Auto populate value in drop-down menu

Jump to solution

Is there a reference guide for nintex JavaScript code requirements like wrapping code?

0 Kudos
Reply
harryr
Nintex Newbie

Re: Auto populate value in drop-down menu

Jump to solution

If I want to repeat this for other controls on the form can I repeat the code beneath the existing one but change the variable names and names of the controls?

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: Auto populate value in drop-down menu

Jump to solution

In principle yes.

In fact it's enough if you 'repeat' just body of RegisterAfterReady function. But if you 'repeat' whole block nothing wrong happens. Note however, that different type of controls might need to be set  different ways

Reply
bamaeric
Nintex Employee
Nintex Employee

Re: Auto populate value in drop-down menu

Jump to solution

Handy solution.  I was having trouble getting this to work in Nintex Forms 2013 at first, but I finally figured it out.  I had to add a semicolon (;) at the end of the added code after the last }) in the Custom JavaScript.

Reply
emha
Automation Master
Automation Master

Re: Auto populate value in drop-down menu

Jump to solution

yeah, sometimes nintex loses line feeds at the end of custom code, especially if you copy & paste piece of code, and places follow up code right after the closing bracket. javascript engine has then problems to parse it. so one have to go to the custom code once again and append few of them.

Reply
furstlars
Nintex Newbie

Re: Auto populate value in drop-down menu

Jump to solution

Hi Marian

Will this work for list lookup dropdown lists, in a repeating section? I tried it and it didn't work.

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: Auto populate value in drop-down menu

Jump to solution

Hi ‌,

generally yes.

but this script needs to be tweaked to address control(s) in a proper repeater row(s).

0 Kudos
Reply