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

List (multiple-selection) display length

Hello,

I am trying to display a list of options around 170 entries long.

To do this, List (multiple-selection) seems to be the best option for me.

However, it seems like the control refuses to display more then 4 lines.

I have searched for this question and it was asked once before, and a very short answer was given that just said this:

$('#*id*').attr('size',7)

Now I understand that I need to change the size attribute to a number that fits on my form, however I am unsure how to find my ID.

I did inspect the element and uncovered an ID=1249afba-3713-4218-b7e7-e9fbfdbbbdb0, and the control itself is named in the editor as choOGshipping.

Also, when I am adding this small script, what is the syntax required to use it?

Currently I have this in the custom javascript section of the form settings.

<script>

$('#choOGshipping').attr('size',20)

</script>

This does not work though.

Sharepoint 2010

Nintex Forms 2010

Thanks in advance for any help!

Reply
5 Replies
Automation Master
Automation Master

Re: List (multiple-selection) display length

your script should look like this

NWF.FormFiller.Events.RegisterAfterReady(function () {
    NWF$('#' + jsvarShipping).parent().find('select').attr('size',7)
})‍‍‍‍‍‍

 jsvarShipping is javascript variable configured for the control in its advanced settings

the code should be placed as is into form's settings 'Custom javascript'  inputbox.

you need not care about ay any HTML tags, it's automatically handled in the background

Reply
gwickstead
Nintex Newbie

Re: List (multiple-selection) display length

Hello! Marian!

Thanks for your quick reply!

I've tried to set it up the way you have suggested and I am still not seeing any change:

Object Advanced Properties

Form Settings

Result in Preview

Result in Editor

Can you see anything wrong with what I have done?

Also thanks again for your help, even the help with how to script correctly goes a long way ,

Greg

0 Kudos
Reply
Automation Master
Automation Master

Re: List (multiple-selection) display length

the above posted code is meant for lookup control with allowed multiselect (I just followed and corrected the script you posted).

but from pictures you posted right now it looks like you do not use lookups.

is it a choice?

could post a screenshot of its whole config dialog?

Reply
gwickstead
Nintex Newbie

Re: List (multiple-selection) display length

My apologies, yes it is a choice.

It was originally in a repeating section but no longer is.

Would you recommend a lookup field instead?

It is also not connected to a field in the list, as again it was originally in a repeating section.

Please let me know if I can provide you with any further information.

0 Kudos
Reply
Automation Master
Automation Master

Re: List (multiple-selection) display length

I updated above script to work for choices

0 Kudos
Reply