[development] "Subclassing" the standard #autocomplete form widget

Gabor Hojtsy gabor at hojtsy.hu
Thu Jan 18 13:47:03 UTC 2007


On Wed, 17 Jan 2007, Rob Thorne wrote:
> I really don't need to change behavior very much;  I just need to send back 
> an array of array(key, value), where the standard widget sends back an array 
> of string values.  But pretty much everything else that Unconed's code does 
> exactly what I want, and while I can copy if if that's easiest, I don't want 
> or need to change what he did.

How would your widget degrade if there is no JavaScript enabled? It would 
still need to look up the code for the country name on the server side 
anyway (or would require the user to provide the country code if that is 
in a form item). Either way, the Drupal default approach puts less strain 
on the server, while supporting a discrete JavaScript approach as far as 
I see.

Gabor


More information about the development mailing list