I think this is a strange requirement and limited use case where entityreference's field value should retain its value when its source is set to filtered view (filtered applied in views active,open etc).

setup

content type : Year
title : 2014-15
active : type - boolean

content type: Invoice (may be any other type like student_registration,expenses etc)
title : invoice_no#1
entity reference field: widget - radio button, views selection - filtered view of content year( only active year)

With the above setup some invoices will be created referencing active year in ER field. There will no problem while creating or editing with only one year and it is active, but when another year is added like 2015-16 with active set to true and old year 2014-15 to false then editing invoice content changes its ER field value to 2015-16 because views returns year list having active set to true ie 2015-16.

Could it be possible to append the existing value of ER field to views results while in edit mode?

Comments

MrPeanut’s picture

Title: retain entity reference field value when its source is set filtered view » Retain entity reference field value when its source is set from a filtered view

I have this same request. Here's my use case:

The view is a list of active employees. I create a node and select an employee. That employee leaves and his status field is changed to "inactive." When I edit that node, the employee is no longer in the view.

Is there any way to retain the value of the Employee field even when he is no longer in the view?