Action with mandatory fields and default values
1 1

2 posts in this topic

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

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1