Pass default value into search widget


Enhance the search widget to receive a default search string to pre-populate the search box. This would be very helpful showing the search box on the search page and wanting to render it with the last search term searched for to remind the user of what they typed and allow them to tweak their search string without retyping the entire thing.

After enhancing the widget, add a passthrough parameter to cbHelper's quickSearchForm() method.

An alternative to this approach would be to have the search widget detect whether a search had just been run and pre-populate the search box automatically. This would prevent the programmer from needing to pass in the default search string, but would also not allow arbitrary default search strings for other purposes.

Perhaps a combination of both could be developed so the following functionality existed:

  1. Search widget will detect if a search was just run (via routed URL perhaps) and automatically pre-populate itself with the search term used (rc.q)

  2. Default text of search widget can also be overridden at will by rendering the widget directly or via the cbHelper quickSearchForm() method



Luis Majano


Brad Wood




Fix versions