Is your feature request related to a problem? Please describe.
Different fields accept different things for the ui:title uiSchema property.
Describe the solution you'd like
- All fields (
ObjectField, StringField, etc.) have consistent ui:title behavior
- All fields accept a function for
ui:title, with access to formData at least
- Should these points also be true for
ui:description?
Describe alternatives you've considered
- Creating a custom field to replicate base fields with slight modifications in handling of
ui:title
Additional context
- Sometimes, it's desirable to include form data within a question's title. This is possible if using
ObjectField or ArrayField (or maybe even the BooleanField as long as it's using a radio widget?), but not possible with some other field type (e.g., StringField). This seems somewhat arbitrary and might not be that hard to change.
Implementation Thoughts
Seems as though to fix this, we'd need to:
1.) Update the conditional rendering logic in FieldTemplate
2.) Update the StringField to be capable of handling its own ui:title
Does that seem about right?
Is your feature request related to a problem? Please describe.
Different fields accept different things for the
ui:titleuiSchema property.Describe the solution you'd like
ObjectField,StringField, etc.) have consistentui:titlebehaviorui:title, with access toformDataat leastui:description?Describe alternatives you've considered
ui:titleAdditional context
ObjectFieldorArrayField(or maybe even theBooleanFieldas long as it's using aradiowidget?), but not possible with some other field type (e.g.,StringField). This seems somewhat arbitrary and might not be that hard to change.Implementation Thoughts
Seems as though to fix this, we'd need to:
1.) Update the conditional rendering logic in
FieldTemplate2.) Update the
StringFieldto be capable of handling its ownui:titleDoes that seem about right?