Peter,
You make two queries, one for the events for which the user has already signed
up, and the other for all events. Populate the select element by looping over
the all-events query. Use CFIF to see if the current event is in the list of
events for which the user has already signed up. If so, add the "selected"
keyword to the option. [I don't use CFSELECT, but that's how I'd do it
manually.]
Another design pattern is to display two multiple-selects, side by side. One
shows the events for which the user has signed up, and the other shows all of
the remaining events. In between the two multiple-selects are two buttons, one
labeled "Add" and the other labeled "Remove". Use JavaScript to handle the Add
and Remove actions.
-David
On Tuesday, May 01, 2001 Peter Tilbrook [SMTP:[EMAIL PROTECTED]] wrote:
> I have this question.
>
> When a "user" signs up for membership they can choose from a list of
> "Events" they are interested in attending. It is a <cfselect> field
> populated from a database Memo field (so stored in the db as a comma
> delimited list).
>
> Later the "user" is allowed to modify their profile, including events they
> are interested in. The events they chose are in a seperate table from the
> master list.
>
> My question is what would be the best way to display the full list of events
> but have the events the user previously selected highlighted?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists