change state field to readonly