The <CFSELECT> Tag

<CFSELECT> is arguably the most valuable tag available in <CFFORM> because it has the greatest potential to save you time and hair-pulling. To see why, let's look at an example.

Remember my database of 8-track tapes back in Day 10? I built a database table that stored the names of all the tapes currently riding around in my car. Let's say I want to let Web users vote for their favorite tape via a form. I'll use a pull-down SELECT box that will list all the tapes, as shown in Figure 11.5.

Figure 11.5. This form uses a standard SELECT box to enable users to choose a value.

To create this form, I did things the old way for purposes ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.