• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic selected drop down menu

New Here ,
Apr 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

We have a drop down menu that users use to select their industry.
The issue comes when they go to edit their industry it defaults to the first one in the list and not the one they selected originally.
Hope this makes since, can any one help me?
TOPICS
Advanced techniques

Views

176

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

LATEST
You would first need to read that users 'industry' field from the database, then do something like

// get users industry and assign it to originalIndustryId

<select>
<cfoutput>
<cfloop query="industries">
<option value="#id#"<cfif id eq originalIndustryId> selected</cfif>>#name#</option>
</cfloop>
</cfoutput>
</select>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation