How do I either...

A) Use entity reference prepopulate (or some other relationship filter) to show content that is already pre-selected in one content type in another content type

or

B)Include content for input (in a text box) in a view (so users can input text via that view).

Is either possible?

I've been stuck on this one for weeks, watched dozens of videos, and I appreciate the help.

Comments

Stefan Lehmann’s picture

Not sure what you mean with A) but Editable Views could be an option for B) .. but I'm also not sure what you exactly mean.

I like cookies!

JBtakenote’s picture

I'll check out the editable views module. Hopefully that works!

Sorry about the confusion with option A. What I'm looking for there is if there is any way to apply Entity Reference Prepopulate to a list of taxonomy terms so that they appear in a content type only if they are already pre-selected. So I want views filtering functionality but in a content type. That would be the other way to create what I'm looking for in option B, but with a content type instead of through a view.

Stefan Lehmann’s picture

I'm still not completely sure what you're looking for. Do you want to limit the available taxonomy terms in a field on a specific content type?

If so I believe you could create different views which would feed the entity reference field. But you would probably have to hard code the filter for limiting the taxonomy terms based on their tids.

I like cookies!

JBtakenote’s picture

Here's the story:

I am creating a travel platform for reviewing and rating destinations. Users can rate and review a destination overall, but also specific experiences (golf, wine, scuba diving, volcanos, etc.). The user-generated content for those specific experiences includes a 5-star rating (using the module) and short text field of up to 60 characters (which I call a "1-word Review").

Each destination is its own term inside a taxonomy (with no additional fields) called "Destinations."

The master list of experiences is inside a taxonomy called "Experiences." This taxonomy has a field for the 5-star rating and one for the short text field.

Obviously, every destination has its own experiences from the master list, while not including others (Maui HI and Rotorua NZ have volcanoes, New York City does not).

So, first I created a content type that lists each item in the Experiences taxonomy with checkboxes (to select only those that apply to that destination), and using the correct destination from the Destinations taxonomy as an entity reference.

The next step is to create a setting where users can see the selected experiences for a particular destination and then rate the ones they want with 5-star, and enter their 1-word review text content. That requires filtering that list of experiences with the destinations entity reference from aforementioned content type.

I'm not aware of any way a content type could filter with an entity reference, so that is why I think I need the view with EditableViews enabled.

So I built the view, and chose "show taxonomy terms" at the top, selected the experiences taxonomy, selected the editable table, and then added the appropriate fields, including the name, 5-star, and text field. It worked, and gave me the full list of all experiences, with each one's accompanying (and editable) 5-star and text field. That's great!. But, when I went to the Contextual Fields to pull in that Destinations entity reference so it will display those experiences filtered for each individual destination, it did not give me a choice.

So then I built the view, and this time chose content, and selected - specifically - the content type that I mentioned at the top. This time, I get the right contextual filter option, and it works in the preview, but I cannot get the editable two fields to appear.

So I'm obviously doing something wrong with at least one of these view choices. And that's where I'm stuck.

Ironically, if I only had the 5-star, there would be no problem at all!

JBtakenote’s picture

Especially if I build the view on the taxonomy my content is based around. But then it won't let me filter the content based on the entity reference I used to build the original content type. If I build the view on the content type itself, I cannot seem to get every term in the taxonomy to appear with each field, but the entity reference filter definitely works. I'm obviously missing something here. What do I do?