0

I have a form I want to fill in based upon some large amorphous external data. User starts typing in some text and AJAX offers suggestions. Now in the Drupal world I could do some AHAH which send the user entered data back to the server and some PHP could supply replacement bits of the form to return. (as per http://drupal.org/node/348475 and http://drupal.org/node/331941 ) But what if my code is not in PHP but in some other web enabled language like python, perl or Java.

Is there a standard way of doing this with Drupal, or should I use jQuery and avoid Drupal entirely for this.

4
  • 2
    AFAIK, as long as you can point an autocomplete form element to a URL which returns JSON data or the like, you should be OK. Did you try setting the #autocomplete_path to something else than a Drupal menu entry ?
    – Countzero
    Mar 30, 2012 at 14:34
  • Countzero, thanks. Can you point me to an example of using autocomplete_path? I don't see how it fills in other fields in the form - just the one being typed in. (eg appnovation.com/how-implement-drupal-ajax-autocomplete) Mar 30, 2012 at 14:49
  • To fill several fields at once would be much more complicated. I don't know of anything Drupal offers to do this, nor any other technology BTW, so of course I have no example to provide.
    – Countzero
    Mar 30, 2012 at 14:59
  • 2
    @AlexMcLintock I'd strongly advise writing a custom JS script, trying to bend Drupal to do this might get pretty messy
    – Clive
    Mar 30, 2012 at 15:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.