In #76663 all of the checkboxes in 21-526EZ were migrated from v1 to v3 components. The v3 components were implemented using fields, but platform would prefer that they are implemented using patterns.
A field looks like this:
export const uiSchema = {
'view:hasAlternateName': {
'ui:title': 'Have you served under a different name?',
'ui:widget': 'yesNo',
}
}
export const schema = {
type: 'object',
properties: {
'view:hasAlternateName': {
type: 'boolean',
properties: {},
},
},
};
A pattern looks like this:
import { yesNoUI, yesNoSchema } from 'platform/forms-system/src/js/web-component-patterns';
export const uiSchema = {
'view:hasAlternateName': yesNoUI({
title: 'Have you served under a different name?',
})
}
export const schema = {
type: 'object',
properties: {
'view:hasAlternateName': yesNoSchema,
},
};
In #76663 all of the checkboxes in 21-526EZ were migrated from v1 to v3 components. The v3 components were implemented using fields, but platform would prefer that they are implemented using patterns.
A field looks like this:
A pattern looks like this:
Relevant Documentation
Fields and patterns: https://depo-platform-documentation.scrollhelp.site/developer-docs/va-forms-library-web-component-fields-and-patterns
How to use patterns: https://depo-platform-documentation.scrollhelp.site/developer-docs/how-to-use-web-component-patterns
How to use fields: https://depo-platform-documentation.scrollhelp.site/developer-docs/how-to-use-web-component-fields