Hi,

I have an exposed filter block allowing users to filter content based on the value of CCK fields.

It works great, however, just before the page generated by views gives the result i'd like to print out some summary feedback, for example if the user filters by fruits and their happened to be 5 fruits returned i'd like this:

Your search for Fruits returned 5 results.

I'd then like the view to provide the list it currently does on the same page.

Thanks,
Gary

Comments

dawehner’s picture

you could do this for example with using hook_form_alter of the exposed filter form. There you get the values of the form elements and then create your custom sentense as variable.

if you have generated your text you can easy add this text and the end of the form with

<?php
$text = 'your generated text';
$form['sentense'] = array(
  '#type' => 'markup',
  #value' => $text,
  // display at the end of the form.
  '#weight' => 100,
);
?>
esmerel’s picture

Status: Active » Closed (fixed)

Fix provided