How to substitute a value of an exposed filter for views? I have a view with an exposed filter with taxonomy tree. Each term can be selected or unselected. If some parent term is selected but every of its child terms isn't selected then all the children terms also should be added to view filter.

But if I select one children term after it, the view should be filtered only by this children term (not by all children terms).

I decided to solve this problem trying to add children terms in the view parameters. By my idea, the view should use this parameters for its execution.

But, unfortunately, I can't understand where to add these params. I tried to use different view hooks, having tried to add them in vars $view-&gt;exposed_data, $view-&gt;exposed_raw_input, $view-&gt;exposed_input. No result.

I also tried to add them in the submit function of the exposed filters form. No positive result also.

Could you clarify me, where can I add new params into the view ?

For example, a user selected term1. In this case term2 and term3 should be added to the view parameters programmatically. And after it, views should use parameters term1, term2 and term3. 

I hope, I've described the problem clearly
I solved a similar issue using hook_views_pre_render(&amp;$views).