1

I have created a content type Subjects with following fields:

  • Student ID
  • Subject Title
  • Subject Code
  • Subject teacher

I have also created an entity form for accepting comments from students about subject they study and subject teachers.

I am trying to create an entity reference view and also want to use exposed filter. Reason for using exposed filter is that I want student to provide his student ID so that subjects which he is studying is updated in a select list. I am unable to achieve this.

I am also using Entity Reference autofill module to display the value of Subject Code and teacher in my entity form. The value of Subject code and teacher will be populated based on Student ID and Subject code. Please note one student will be studying more than one subject

I have already created a few contents of type subjects. My question may appear a duplicate question but I read mostly all answers but nothing is matching my case.

  • Student ID is a user entity reference field, correct? – No Sssweat Jan 9 '16 at 23:30
  • Yes it's entity reference field. – user2129638 Jan 9 '16 at 23:57
  • So you want when user enters node id, the view updates and shows all the subjects user x is taking? – No Sssweat Jan 10 '16 at 0:00
  • Yes, this is what I want. Currently my entity reference view is showing all subjects. I am not able to use exposed filters. – user2129638 Jan 10 '16 at 0:17
0

I don't have drupal on me atm to try this out. So consider this an educated guess.

in RELATIONSHIP add student_id referenced entity and click on force relationship.

Then hope that in filters, there is a new option to add referenced entity.

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.