I have a Drupal 7 multi-site installation with some shared modules. Some of these modules declares some forms. And here comes the problem: How to make these forms look different in two different sites? For example: In one site the whole form needs to be on a single page but in another site it needs to be divided in two steps, how can I solve this without change the module code?
I tought in some solutions:
- Create a custom module for the site that needs the form to be in two steps.
- Break in two steps using javascript and handle the navigation on the client site.
- Create a configuration on the shared module (the problem here is that I'd have to create a specific configuration for every possible customization on the form).
- Create a template for the form and handle this steps in specific site theme.
- Change the module to, instead of creating a form using FAPI, creates a webform node that could be changed for the specific site when the module is installed.
What would be perfect for me is that is someway I could implement a form alter hook in the theme but it isn't possible, right?
What do you think? How you solve this problem?