0

I have a Sharepoint 2007 site and want to create a list that users can filter dynamically using a form or something similar. The use case is as follows:

  1. A user is shown a list with any number of items. The list itself includes a data column to be used by the filter form.
  2. The user uses a filter form with a drop-down selector bound to select what items they want to see, or default to show all.
  3. After selecting the items to filter, the items they picked to display are shown.

I added a form web part to the list page, but I'm not sure how to add drop-down elements to it, can I add drop-downs using the source editor? If so, how can I specify the lookup columns for these drop-down selectors?

1

You can use OOTB Filter web parts and SharePoint webpart connections for this purpose. For details, please have a look at the following MSDN article:

If the functionality of the OOTB filter webparts won't do, you can write your own filter webpart. There is a good sample on MSDN:

0

Incredibly late answer but in case anyone stumbles on this: Yes, you can add your dropdown code to the source editor. Works well if you have a "known" list of filter terms. There's a how to here: http://365.webbrewers.com/blog/Lists/Posts/Post.aspx?ID=39 Sample code:

<div onkeydown="javascript:if (event.keyCode == 13) _SFSUBMIT_">
<select name="Media">
<option value="Painting" selected="selected">Painting</option>
<option value="Drawing">Drawing</option>
</select>
<input type="button" value="Go" onclick="javascript:_SFSUBMIT_"/>
</div> 

The simply connect the form to your list and select the field(s) you wish to filter on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.