Display a view with exposed form programmatically I show a view in my own module, like this: $viewFromDrupal = views_embed_view('storage', 'block');. The view is showing up, but the exposed filter is not working when I place the included view directly after an other view.

When the view $viewFromDrupal is showing at the top of the page the exposed filter works correctly.

Does someone have some experience with this?

Should I include some extra files or something?
So better to say in your question more details of how it doesn't work, but I'll take a guess...

Try

$view = views_get_view('storage');
  $view-&gt;set_display('block');
$view_markup = $view-&gt;preview('block');


I've done this before to render the View, that will give you some markup...

Then I've noticed that the "action" of the form could be incorrect, so you have to do a hook_form_alter implementation and set the #action to the current page path...I'm guessing what the value of $form['#id'] will be, you will need to verify that ...

    function yourmodule_form_alter(&amp;$form, &amp;$form_state) {
    if($form_id == 'views_exposed_form' &amp;&amp; $form['#id'] == 'views-exposed-form-storage-block') {
        $path = current_path();
        $form['#action'] = '/' . $path;
    }

  }