Updated: Comment #25
I've been implementing locked fields on Drupal Commerce entities in modules to do things like have default price fields on products and a default line item reference field on orders. This is great, because I don't want these fields to be deletable.
However, I then discovered the side effect that these fields' settings could not be altered. I figured I'd deal with that when I discovered that yea though settings can't be adjusted, the widget for the locked field can be changed. The problem is different widgets have different settings for the same field, and one widget's default settings won't make any sense to another widget.
I can see maybe three quick solutions here (I'm sure there are other options) but need input from those in the know:
- Don't allow locked field instance widgets to be changed.
- Allow settings for locked fields to be adjusted but do not allow locked fields to be deleted.
- Introduce a multi-level lock so a field could be either non-deletable but alterable or non-deletable and non-alterable.
Patch needs review.
User interface changes
As mentioned above.