Sample scenario to illustrate the type of problem I'm trying to solve:
Online store has orders and in the order it refers to a product. Users can edit existing unsubmitted orders and one of the things they can change is the product that they've ordered via a product select (html ). A separate business process can flag products as 'discontinued' meaning they are no longer able to be ordered in new orders (but existing submitted orders will still be honoured/processed).
A user goes to edit an unsubmitted order for a product that has since been discontinued. Would like the user to be able to see the name of the product that they did order originally (so they can recall what they were trying to order), but prevent them from saving this order as the product is discontinued. They can however use the product selector to pick a new product.
Suggested approach is to include the 'discontinued' product as a 'disabled' option on the HTML select for products and append the word (discontinued) after it. If the user attempts to save the order they will be shown error 'your order contains products that have been discontinued'.
So when the user opens the order they will see for example:
Qty 3 Product: Red Goo (discontinued) v Price: n/a
They can then click the product selector and will see the valid products and "Red Goo (discontinued)" will also show in there but disabled. Use CSS to show the discontinued value in red.
Thoughts on this approach.