Need help to setup the autocompletion with contextual filters

Created on 23 October 2020, over 3 years ago
Updated 3 July 2023, 12 months ago

Problem/Motivation

I want to setup an autocompletion field for a search form inside a paragraph. So far, I got the module to work smoothly, then created a custom view for the autocomplete callback. However, in my case, the search field is set to redirect the user with 4 informations: 3 target ids and what the user actually typed in the search bar. When he submits his query, he gets redirected to a view page which url looks like follows:

/publications/results/55/209/all?name=doc

My autocomplete callback is a duplication of the view where the user gets when he submits, so it still requires the 3 contextual filters.

My question is: How do I alter this view to make it work? I tried to create a hook_views_pre_render() but it didn't seem to work that way.

Thank you in advance

P.S: related is someone having a similar problem

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the β€œVDC” tag instead.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024