We had a need to do some styling to the Back and Next buttons, but required a DIV wrapper around all the buttons. Unfortunately, the place where the output is generated is not in a theme function, so we had to manually add in some markup form elements into the multichoice module's code. I thought I would share our patch in case others found it useful, and maybe it would be added to the module for future releases :)

Comments

davemybes’s picture

Patch is against the June 9, 2009 dev release.

mbutcher’s picture

You should be able to theme the form by creating theme_multichoice_render_question_form(), right?

davemybes’s picture

Status: Needs review » Fixed

Ah, yes, you're right. I had to figure out that forms are inherently themeable in D6 using the themename_theme() function in template.php (just in case anyone else is interested), along with a themename_preprocess_FORM_ID function and a tpl.php file of your choosing (defined in themename_theme().

In the end, however, I used hook_form_multichoice_render_question_form_alter(&$form, $form_state) to add a #prefix and #suffix. This was because we are switching themes on the site, and doing it this way allows me to have one module for all sites, instead of editing each theme's template.php file etc. (I know about sub-themes, but the themer for the site doesn't like to use them).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.