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

second dropdown based on previous dropdown?

Guest
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

Greetings

There seems to be no easy way to accomplish this without javascript/CF  with dozens of lines of code.

The scenario: table 1 has banks, table 2 has loan processors. Client chooses bank from DDSB, only the processors from that choice show up in the second.

Processor table has FK relationship to bank PK.

ColdFusion 9.0.1,
Microsoft SQL Server 2008 R2

Is there a simpler solution?

Thanks and have a great New Year.

TOPICS
Advanced techniques

Views

655

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 ,
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

Bind your dropdowns to cfc methods.  The documentation on cfinput has examples.

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
Community Expert ,
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

LATEST

You can do this by means of the bind attribute of cfselect, easy peasy. In fact, the ColdFusion documentation on cfselect has a fully worked out example.

Have a look at the CFM and CFC of the last example. All you have to do is replace States with Banks, and Cities with LoanProcessors. The functions then become getBank() and getLoanProcessors().  Each runs a query. The first function returns an array of banks, the second an array of loan processors for a given choice of bank.

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