Smart action with a dropdown list

Hey guys,

I’ve been looking in all the topics to find what I need but unfortunately I couldn’t find what I need.
So I just need to add a dropdown list with enums inside a smart action and need to retrieve what enum is chosen by from the dropdown from the smart action in my route.
This is my code (inspired by this topic : Is it possible to show list of all possible values in dropdown when using Smart Action's form field with "reference") :

actions: [{
    name: 'Test',
    type: 'single',
    fields: [{
      field: 'Choice',
      type: 'ENUM',
      enums: ['Validate', 'Refuse', 'Edit'],
      isRequired: true,
      widget: 'dropdown'
    }]
  }]

Thanks a lot!!!

  • forest-express-sequelize: ^7.0.0
  • Express Version: ~4.17.1
  • Sequelize Version: ~5.15.1
  • Database Dialect: postgresSQL
  • Project Name: nostrumcare

Hey @caid,

I’m sorry but I’m not sure to understand you. You are juste ttrying to use an enum that’s all ?
This should work. If not please share a video :pray:

Hey @vince

I’m trying to create a dropdown list in my smart action, I tried with the enum but it didn’t work :confused:
Do I have to compress the video in .tar to upload?

Thanks!

Use loom.com for example. It’s quite easy to use and you’ll just have a link to share :wink:. No need for tar

@vince nice!!!

Here’s the video Loom | Free Screen & Video Recording Software :slight_smile:

Oh I did not realised, remove the widget it’s useless and the type need to be Enum not ENUM. Tell me if that works

Hey @vince

Niceee that’s working !!!

Thanks a lot !!!

@vince is there a way to use a custom “placeholder” for the dropdown, the default one is “select” but I want to replace it :confused:

Best,

Not actually i’ll push your feedback to our productboard