What's the best way to have a DynamicForm item conditionally enabled or disabled based on whether the record being edited is new or existing (respectively)?
I'm using a DynamicForm to allow users to edit a dataset and I only want them to be able to edit a certain field when its a new record. When they're editing an existing record that field should be disabled.
I was hoping there would be some way to attach a Handler to the form such that when the record is changed I can insert the necessary enable/disable logic based on whether the record isNew or not. But alas, there is not such Handler. I tried also using the item's setInitHandler() but I don't think that is fired everytime the underlying record is changed.
Any ideas or suggestions? Thanks in advance.
I'm using a DynamicForm to allow users to edit a dataset and I only want them to be able to edit a certain field when its a new record. When they're editing an existing record that field should be disabled.
I was hoping there would be some way to attach a Handler to the form such that when the record is changed I can insert the necessary enable/disable logic based on whether the record isNew or not. But alas, there is not such Handler. I tried also using the item's setInitHandler() but I don't think that is fired everytime the underlying record is changed.
Any ideas or suggestions? Thanks in advance.
Comment