2

Say, one content type is "CONCEPT" and it has a field named 'STATUS'. Another content type is "Article" and it has a node-reference auto-complete field named 'CONCEPT FROM'.

Now I want to see only "CONCEPT" contents whose status value is "ACCEPTED" as a suggestion of "CONCEPT FROM" auto-complete field.

  • You have to create a view & apply filter on them that "Show CONCEPT whose STATUS is ACCEPTED" – Nishant May 14 '15 at 7:47
2

If you're using the entity reference module, what you can do is autocomplete from an entity reference view. You can add a filter on your entity reference view that filters nodes of type CONCEPT with a status field value of ACCEPTED. Once your view is created, you can select it under the Entity selection fieldset.

3

Thanks @shawn-conn His answer is perfect but I can't give vote because of minimum reputation. See following solution in details:

Step 1:
First create one entity reference view
Note: In this view include referenced content type (e.g.: CONCEPT) and it's filter/condition field (e.g.: STATUS)

Step 2:
From MANAGE FIELDS of the required content type (e.g.: PROJECT), Add field that FIELD TYPE will be Entity Reference and WIDGET will be autocomplete then click on the SAVE button.

Step 3:
Now choose Views: Filter by an entity reference view option in MODE field and choose your views that is created in Step 1 in View used to select the entities field from ENTITY SELECTION section of the field settings page.
image

Step 4:
Click on the Save settings button to save changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.