There is an ability to define a form behavior in EspoCRM.
Example: Need to show nextStep field on Opportunity detail view only if stage is ‘Closed Won’.
Create a file custom/Espo/Custom/Resources/metadata/clientDefs/Opportunity.json
{
'formDependency': {
'stage': {
'map': {
'Closed Won' : [
{
'action': 'show',
'fields': ['nextStep']
}
]
},
'default': [
{
'action': 'hide',
'fields': ['nextStep']
}
]
}
}
}
That means that nextStep field will be hidden by default and shown if stage equals ‘Closed Won’.
The list of available actions: ‘show’, ‘hide’, ‘setRequired’, ‘setNotRequired’.
This type of thing really needs to be configurable by Admin users.