Coldfusion (CFC's, Autosuggest, binding and Ajax)

Posted on 2009-05-10
Last Modified: 2012-05-06

I am fairly new to using CFC's and Ajax in Coldfusion and really enjoying the potential.

I found an autosuggest tutorial that works great for me.  It is here:

I have a list of customers that I choose from our database using this method.  I start typing their name and I get a suggested list to choose from.  Upon choosing the name, it populates the form field with the value I setup in the CFC.  As expected.  

How can I have more than one field in the form I am working on auto populate?  Let's say that I choose the customer from the "auto suggest" field and when I click on not only fills in that field, but 4 more fields(cfinput type="text") under it (account number, email address, shipping address, etc,..etc..)?

Thank You for any insight or info you can provide!

Question by:tomhwtt
1 Comment

Accepted Solution

Jonah11 earned 500 total points
ID: 24359185
Hey Tom,

I'm not sure if the CFC autosuggest has built-in support for something like this, but one thing you could always do is simply create an onChange javascript function, and it would be called when the autosuggestion was selected and populated.  That function could then do an AJAX query to your database and select the other client information based on the name key, and then use the info to populate the other fields.

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math ( While this method is not o…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now