2 Replies Latest reply on Apr 24, 2008 9:11 AM by emccormick

    passing multiple parms in autosuggest

    larksys
      Ineed a way to have a form element available in the cfc function that I use to bind to a cfinput autosuggestvalue. A previous element on the page contains a company number that I need while doing an autosuggest on a subsequent input.

      Like;
      <cfinput type="text" name="sfsrch#counter#" id="sfsrch#counter#" size="80" autosuggest="cfc:components.tsijobads.getJobsearch({cfautosuggestvalue},{CompanyNumber})" maxResultsDisplay="50">
        • 1. Re: passing multiple parms in autosuggest
          Rodador
          quote:

          Originally posted by: larksys
          Ineed a way to have a form element available in the cfc function ...
          quote:



          I'd like to Second That!

          • 2. passing multiple parms in autosuggest
            emccormick
            You didn't show your cfc function, but your syntax in your cfinput is 100% correct. You can pass additional values to a cfc via Autosuggest exactly as you've shown.

            If CompanyNumber was already assigned a value on your form page (using cfinput...haven't tried it with regular html), you only need to set it up as an argument in your cfc.

            I've yet to find a way to mimic the best use of the old HTML select/option tag, where you would display CompanyNames in the drop down but use CompanyNumber as the submit value. As far as I know, Autosuggest can be populated with a one-dimensional array only.