Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do i set a selected value when i am pulling data from a query for a cfselect?

Posted on 2009-04-25
Medium Priority
Last Modified: 2013-12-24
<cfset state = '#lead.state#' > 

If i am confirming data and want to use the query to pull all states but have one state selected initially   #state#  how would i do that?
<cfselect name="state" query="GetStates" value="state" display="state"/>
What would add to the cfselect to set a state as selected?
Question by:LeadCo
LVL 27

Accepted Solution

azadisaryev earned 2000 total points
ID: 24234768
use SELECTED attribute of <cfselect> tag:

<cfselect name="state" query="GetStates" value="state" display="state" selected="#lead.state#" />


Author Closing Comment

ID: 31574611

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question