Jump to content

Action with mandatory fields and default values


jerome

Recommended Posts

Hi all,

I created an action with a form to let user change some options.

It is working fine BUT I would like to set a default value for an enum field and don't see how in the doc.

If it is not possible I would like to indicate a required field to the user...

Here is the data I send to ftrack for creating the form:

```'items': [

  {'value': '## You are about to ship the list: {} ##'.format(flist.getName()), 'type': 'label'},

  {'label': 'Action', 'type': 'enumerator', 'name': 'action', 'data': [

    {'label': 'Export 1', 'value': 'myval1'},

    {'label': 'Export 2', 'value': 'myval2'}

  ]},

],

```

Thanks for any help,

Jerome

Link to comment
Share on other sites

Hi Jerome,

On 9/8/2016 at 6:04 PM, jerome said:

It is working fine BUT I would like to set a default value for an enum field and don't see how in the doc.

 Does it get picked up if you set ´value´ in the field configuration?

On 9/8/2016 at 6:04 PM, jerome said:

If it is not possible I would like to indicate a required field to the user...

I think the best option is to use the label, so: label: 'Action (required)'

Remember, if you're not happy with the options that is set by the user you can always respond with the same actions interface and a label at the top saying something "Please select an option in the Actions field"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...