Skip to main content
Nintex Community Menu Bar
Question

defaulting picklist value

  • July 9, 2024
  • 4 replies
  • 28 views

Forum|alt.badge.img+1

Hi,

I am trying to defaulting a value in the picklist with the JavaScript.


var params = arguments[0],
$ = skuid.$;

var result=document.getElementById(“PicklistId”);
result.options[1].selected = true;
result.options[1].defaultSelected = true;

But it is not working. Can any one please fix it. 

Thanks.


4 replies

Forum|alt.badge.img+4
  • July 9, 2024

Hi Arjun,

I just started using Skuid, Hope this helps.

var field = arguments[0], value = skuid.utils.decodeHTML(arguments[1]),
$ = skuid.$;
    
    var dataTypes = ;
    dataTypes.push({
        active: true
        ,defaultValue: true
        ,label : ‘–None–’
        ,value : ‘’
    });


Forum|alt.badge.img+1

Goutham, thanks for your reply. Your code is not working.


Forum|alt.badge.img+18

Arjun,

Give this thread a read: https://community.skuid.com/t/how-do-i-render-custom-picklist-values

And this one: https://community.skuid.com/t/using-a-custom-renderer-to-conditionally-set-a-picklists…

I think between the two you should be able to piece it together.


Forum|alt.badge.img+18