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

Dropdown Menu

Guest
Feb 08, 2009 Feb 08, 2009

Copy link to clipboard

Copied

Sorry if this post is really long.

I do a gaming site and I wrote an application so that people could list their treasure priorities. The finished product looks like: http://botdls.com/EinherjarPriorities/einherjar_priority_index.cfm

The problem that I am having is that I am using a cfc system that came out of Ben Forta's book and I can't figure out how to make the priority stuff on the add/update pages a drop down menu. What I am trying to do looks like this: http://migcfdesign.com/EinherjarPriorities/items.gif
When adding a new member, I need the dropdown to be inserted into the database. When updating a member, I need the field to be filled in like it is in the picture and if you don't want to change it, when you submit the form I need it to update with that same value. However, if you decide to change it via the dropdown menu, I need that value to be submitted. I hope that makes sense. Here is all the code for the whole application.
TOPICS
Advanced techniques

Views

313

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

correct answers 1 Correct answer

LEGEND , Feb 08, 2009 Feb 08, 2009
quote:

Originally posted by: MIGhunter
Sorry if this post is really long.

I do a gaming site and I wrote an application so that people could list their treasure priorities. The finished product looks like: http://botdls.com/EinherjarPriorities/einherjar_priority_index.cfm

The problem that I am having is that I am using a cfc system that came out of Ben Forta's book and I can't figure out how to make the priority stuff on the add/update pages a drop down menu. What I am trying to do looks
...

Votes

Translate

Translate
LEGEND ,
Feb 08, 2009 Feb 08, 2009

Copy link to clipboard

Copied

quote:

Originally posted by: MIGhunter
Sorry if this post is really long.

I do a gaming site and I wrote an application so that people could list their treasure priorities. The finished product looks like: http://botdls.com/EinherjarPriorities/einherjar_priority_index.cfm

The problem that I am having is that I am using a cfc system that came out of Ben Forta's book and I can't figure out how to make the priority stuff on the add/update pages a drop down menu. What I am trying to do looks like this: http://migcfdesign.com/EinherjarPriorities/items.gif
When adding a new member, I need the dropdown to be inserted into the database. When updating a member, I need the field to be filled in like it is in the picture and if you don't want to change it, when you submit the form I need it to update with that same value. However, if you decide to change it via the dropdown menu, I need that value to be submitted. I hope that makes sense. Here is all the code for the whole application.

You posted more code than I am willing to read. For the form in your image, it looks like a straightforward update form. What code runs when you submit it?

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
Guest
Feb 14, 2009 Feb 14, 2009

Copy link to clipboard

Copied

Sorry, have been to busy to play with this. It is a standard update. The whole application is a cfc so that it does add, update and delete all in one form. I'm thinking I might need to take a different approach.

Anyway, the problem that i'm having with the current set up is the update form. I need to have it prefill in the form. I have it set up for that now. The problem I'm having is I can't figure out how to make a drop down list for 4 of the fields. I don't want people to be able to put in anything but stuff from the dropdown menu.

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
LEGEND ,
Feb 14, 2009 Feb 14, 2009

Copy link to clipboard

Copied

Are you using cfselect? The query and selected attributes are rather handy.

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
Guest
Feb 14, 2009 Feb 14, 2009

Copy link to clipboard

Copied

quote:

Originally posted by: Dan Bracuk
Are you using cfselect? The query and selected attributes are rather handy.

Man that's awesome. Just what I needed. Someone on easycfm.com was helping me do some stuff with Ajax but this is the simple fix I was looking for. One more question though. The original form is blank if you are adding a user. If you are updating a user it fills in the form with the stored database info. Is there a way to do that with cfselect? The stored info would be whatever is in the dropdown menu so it's all the same info. Basically, It's 4 fields and people might only want to update 1 of the 4 fields. I don't want them to have to reclick or even remember what their old entries are.

----------------------------------------------------------------------------------------
{Edit}-Found the answer to this on Forta's blog. Surprised it isn't listed in the livedocs. If you place QUERYPOSITION="below" it fixes it.
also, along the same lines, I use this code which put's the "None" option at the bottom of the list. I played with it and can't figure out how to get it to place "None" at the top of the list. Is there a way to do this?

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
Guest
Feb 15, 2009 Feb 15, 2009

Copy link to clipboard

Copied

LATEST
Nevermind. For some reason it wasn't working and then it was. Here is the way to do it.

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