I’m really struggling to get my head around Drupal Form API…actually Drupal as a whole.
Here’s my problem, I’ve created a form with renders fine, however what I’ve like to do now is wrapper divs around certain form elements, this is so I style my form in a way that’ll suit my site and not some box standard crap.
Can someone please help or at the least point in the right direction of a “good” tutorial and not some brief and very vague nonsense that is plastered all over the web?
thanks.
hook_form_alter is your friend here.
In your theme’s template.php file you can add prefixes and suffixes to forms, form elements etc.
Below is an example from a site I did recently.
Inspect your code to get the form you want to theme’s id. Replace underscores with hyphens and you should be able to use the example above to do what you want.
At it’s most basic I guess an example would be: