Change/disable default value screen

How can i disable or change the default value screen?
My custom field is saving an JSON object and the default screen is not user friendly to manage that kind of data

Hi @mmellaa,

There is no possibility to disable the configuration of default values, nor to provide your own custom UI for it at this time.

One thing you can do however, is provide a parser. This would allow users to enter human-readable values into the “default value” input, which your parser would then transform into JSON objects.

1 Like

That’s too bad.
How can i retrieve configuration info to the parser?
Use case is that my field has some configurations like, accepting negative values, lenght and others

If I understand correctly, your field has configurable validation rules? If that’s the case, then you can implement a validation expression that works according to those rules (the expression has access to the configuration saved for the field and can modify its behavior at runtime based on it), and then the parsed value will be automatically validated with it when provided by the user.

1 Like

Thanks @kkercz ,
Validation will work when the value is added isn’t it?

On the other side. How can i have some conditional rendering?
For example, have the background color of the field in the configuration of the field and apply when rendering?

Yes, validation is triggered when a value is provided for the field.

During rendering, you can read the configuration data stored for the field. It’s always available in the context. To control the background color, you will need UI Kit rendering.

Thank @kkercz
I was playing around with that, and i can render my field correctly.
The problem is that i can’t render my field in the same way on “search issue” or dashboards.

That’s right. Not every view supports UI Kit rendering. In that case you can use the formatter, but it outputs only plain text.

And i can’t retrieve any information store in the configuration when i use formatter. can I?

You can. Your configuration is available in the configuration context variable. Consult the documentation for more details.