[drupal-devel] Forms API conversion help

Karoly Negyesi karoly at negyesi.net
Sat Oct 15 10:45:36 UTC 2005

> I was in the same situation as you, and I've found that when in doubt,  
> it is best to open up form.inc and look for theme_<#type>, e.g.  
> "theme_checkbox", "theme_select". Then you can see what HTML is output.  
> If you still can't figure it out, remember (or look for) a core form  
> that is similar to the one you have, and see how it is made ;).

This is not that bad, apart from the small problem that a lot of stuff  
used in theme_foo is created in _form_builder and you should not set them  
by hand. Examples are name, id and for most elements (where the user can  
change them) value, too.

Yep, it's better to look around for a similar form and nick the code.



More information about the drupal-devel mailing list