I have written a small module for Drupal 7 that provides a formatter to render just the exposed form of a view in a viewfield. Wondering if you would be interested in adding this to viewfield itself if I provided it as a patch for D8 and backport to D7? Otherwise, the D7 module is attached if anyone is interested. The use case for me is a block (bean) that displays a few fields before the exposed form.

CommentFileSizeAuthor
viewfield_exposed.zip1.33 KBmstrelan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstrelan created an issue. See original summary.

jerdavis’s picture

Status: Active » Needs work

I see no reason not to include this if a suitable patch is provided.

jerdavis’s picture

I'll update to add that one of my concerns here would be how we would handle this for displays that weren't page displays. It seems like for this to work, the exposed form would have to be related to a page display that the form could submit to. This could lead to confusing behavior if a user picks a view and display that isn't a page display but has this selected as their formatter.

jerdavis’s picture

Status: Needs work » Active
jerdavis’s picture

Status: Active » Fixed

Given the ease in adding your own field formatters in Drupal 8, I'm going to recommend that you implement this in either a custom module, or a related contrib module. There are a lot of different display formatters that don't provide a route to view the results. To me, that makes it problematic to provide a formatter in the standard module that would only function properly with page displays. The exposed filters would have no where to submit to otherwise, or we'd need a more complicated formatter that took the exposed form and executed the view, returning the results in the same space via ajax. That functionality could be accomplished by configuring the exposed filters to require user input and ensuring that the View had ajax enabled.

If you do create a extensions module with a formatter for this, please let me know and I'll be happy to link to it on the project page.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.