I have a model which I’m exposing over a REST interface. Over the course of this model’s lifecycle some fields will become read only, whilst other will remain editable.
I’m happy with handling this on the server side (as per this question) – I’ll expect the client to send all of the data and I’ll return an HTTP error 409 if they attempt to change a read only field.
However, how can/should the client discover if a field is read only in order to allow it to disable inputs?
@JimmyP
Here is a simple example:
Pay attention to following details:
If client can recognise link header and value of "rel" attribute, then it can fetch editing resource and determine which fields need to be send back. Of course besides data elements(i.e. fields) "form" may also indicate submission URI, data encoding type, HTTP method etc…