How do you theme the "save" button in the profile page (user/uid), on a Drupal 6 installation? I´ve tried and when I try to theme it, it theme all "save" buttons on the site.




Found it! I thought I would post it here just in case anyone wonders the same... HOOK_FORM_ALTER!

Yay, it was sooo easy with that. With hook_form_alter you can add a prefix and a suffix with the css classes, and that´s it.

This video podcast of mustardseedmedia helped me A LOT.




It's a bit unclear what you mean by "theme", but if you need to change the markup, you could create a custom theme function for the form itself and handle how the save button should look like there. If you overwrite the theme function for the submit button in your theme, you are going to change all submit buttons like you experienced.

  • Yes, I want to change that markup for that specific button. I tried to find a snippet but couldn´t find one... – Rosamunda Mar 12 '12 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.