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


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!

Who is Participating?
Jonah11Connect With a Mentor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.