WebViewer Version: 8.1
We’re using field flags to set some various fields to read-only when they’re being pre-populated with imported data.
We have some custom styling which is working fine for all fields except checkboxes that have been set to read-only. They’re having styling applied which we’re struggling to override. Simplified example of our custom styling code as follows;
const applyCustomStyles = (annotations) => {
annotations.WidgetAnnotation['getCustomStyles'] = (widget) => {
if (widget.fieldFlags.get('ReadOnly') === true) {
if (widget instanceof annotations.CheckButtonWidgetAnnotation) {
return {
fill: 'black',
'background-color': 'white'
}
}
return {
color: 'black'
}
}
return {
'background-color': '#E6E6E6',
color: 'black',
}
}
}
None of the custom styles we set for read-only check boxes are being applied.
Any pointers?