Note that there are some explanatory texts on larger screens.

plurals
  1. PODrupal 7 Views 3: Exposed Filters that search specific FIELDS
    text
    copied!<p>I'd really appreciate some help with this.</p> <p>I'm trying to create two different exposed filters in Views. I currently have 6,000 nodes with 75 fields each inside one content type. I'm using a Page View with an exposed form in a block. I also have the Better Exposed Filters module installed.</p> <p>The first one, I want to make a text box for searching terms, <strong>but have it only search my specified fields</strong>. I would have it search 3 fields (to do a search on the full name): First Name, Middle Name, Last Name. They are all in different fields. <strong>The only thing I've been able to make it search so far is EVERY TERM in a content type</strong> (where it searches every field, not just name). I did that by exposing this filter:</p> <pre><code>Search: Search Terms The terms to search for. </code></pre> <p>The next filter I am trying to do is for the field "Graduation Class." It might be best to do search terms for this too (if I can figure out how to search ONE field, like above), but I was hoping to have a select dropdown that lists every Graduation Class. These classes in this field range from 1905-1972. When you click a year in this box, it filters the current results by that year.</p> <p>This sounds pretty basic, but I can't seem to get it and would REALLY appreciate some help.</p> <p>For your reference (if needed), here are the types of filters I can add. <em>(Off topic: I'm actually not so sure what the ":format" ones exactly are)</em>. For the "Content:" filters, I'll only show the "Name" ones, because there are 73 others. Many of these filters are from the Feeds module, because that's what I used to import my nodes:</p> <pre><code>Content: First Name (field_cinfo_fname) Appears in: node:cadet. Content: First Name (field_cinfo_fname:format) Appears in: node:cadet. Content: Middle Name (field_cinfo_mname) Appears in: node:cadet. Content: Middle Name (field_cinfo_mname:format) Appears in: node:cadet. Content: Last Name (field_cinfo_lname) Appears in: node:cadet. Content: Last Name (field_cinfo_lname:format) Appears in: node:cadet. Content access: Access Filter for content by view access. Not necessary if you are using node as your base table. Content revision: Log message The log message entered when the revision was created. Content revision: Title The content title. Content revision: Updated date The date the node was last updated. Content revision: Vid The revision ID of the content revision. Feeds item: Import date Filter on a Feeds Item's import date field. Feeds item: Item GUID Filter on a Feeds Item's GUID field. Feeds item: Item URL Filter on a Feeds Item's URL field. Feeds item: Owner feed nid Filter on Feed Items by the Feed they were generated from using the Node Id of the Feed Node. Feeds log: Feed node id Filter on a Feeds Source's feed_nid field. Feeds log: Importer id Filter on an importer id. Feeds log: Log time The time of the event. Feeds log: Request time The time of the page request of an event. Feeds log: Severity Filter on the severity of a log message. Feeds source: Feed node id Filter on a Feeds Source's feed_nid field. File Usage: Entity type The type of entity that is related to the file. File Usage: Module The module managing this file relationship. File Usage: Use count The number of times the file is used by this entity. Page Title: Title A Page Title alternative to the Node: Title field. Search: Links from Other nodes that are linked from the node. Search: Links to Other nodes that link to the node. Search: Search Terms The terms to search for. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload