[Catalyst] autocomplete forms?

Dami Laurent (PJ) laurent.dami at justice.ge.ch
Mon Jan 5 07:17:34 GMT 2009


>-----Message d'origine-----
>De : Michael Higgins [mailto:linux at evolone.org] 
>Envoyé : mercredi, 31. décembre 2008 18:45
>À : The elegant MVC web framework
>Objet : [Catalyst] autocomplete forms?
>Hey, all --
>Using formbuilder forms with Controller::FormBuilder. But. 
>What I'd like (actually, probably need) is to have some of the 
>list select boxes asynchronously populated with lists that 
>would autocomplete.
>Am I painted into a corner, or can I shoehorn some AJAX-y 
>goodness into Controller::FormBuilder? If so, how? 
>If not, what should I use?

Hi Michael,

There is an autocompleter component in Alien::GvaScript -- 
see http://search.cpan.org/~DAMI/Alien-GvaScript/lib/Alien/GvaScript/AutoCompleter.pod
This is perhaps more complex than other libraries, but it has many options (strict/non-strict, case sensitive or not, autosuggest, multivalued, typeAhead, etc.)

This is pure javascript, so it should work well together with FormBuilder; you will need to declare the Autocompleter object in the HTML head, and then add an 'onfocus' attribute on the field(s) to be autocompleted. You will also need to setup your datasources for autocompletion, which can be either inline objects in your page, or some controllers in your app that return JSON data.

Best regards, 

	Laurent Dami

More information about the Catalyst mailing list