Skip to main content
Nintex Community Menu Bar
Question

Dynamically add options to a picklist (Fieldin a Template )

  • July 9, 2024
  • 3 replies
  • 14 views

Forum|alt.badge.img+6

Hi,
I have a picklist field in a template, and I want to add options dynamically to this picklist. how could I achieve this?

--None--

note : I think I cannot use picklistEntries as I use a SKUID template and which contains pure HTML stuff?

Thanks and appreciate your help.

3 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

If I understand correctly,  you have a picklist field included in a template (on a field editor).  When the user clicks on the template they get a popup where each field in the template can be edited.  In this scenario, when the user clicks on the template to open the popup and edit the picklist field - you want to do some customization of the picklist values available. 

If this is the case - you should look at the template properties.  Its  “edit mode behavior” should be set to “Show custom popup”   In this popup you can have full control over the fields - using custom renderers that manipulate the options provided.  


Forum|alt.badge.img+6

Sorry Rob, that’s not what I meant,

I have a pure html dropdown in the skuid template. which contains the above mentioned code snippet, and I want to access this field from a javaScript and add s dynamically such as,

skuid.$(‘#firstYearOfAdvice’).append($(‘’, {
value: ‘2000’,
text: ‘2000’
}));
/*

*/

Please correct me if the approach is wrong.
Thank you


Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

I think that approach makes sense.