I would like to insert a new step (task) in the installation process before the Verify requirements is run. This because the form with options I want in it is part of the requirements verification step.

Unfortunately there seems to be no hook for that. hook_install_tasks is appending new steps at the end, while hook_install_tasks_alter allow me to alter the default core steps.

While I probably could modify the Choose language step, it doesn't feel like an elegant solution as the form I want to add has nothing to do with language.

Is there no such option available?

  • Actually, with hook_install_tasks_alter() you can also add new tasks, in the same way hook_form_alter() allows you to add new form fields to a form. – kiamlaluno Jan 3 '13 at 13:51
  • Oh, that's great. You don't happen to know a distribution that does this that I can have a look at? – tsvenson Jan 3 '13 at 14:01
  • I was looking for that, but I didn't find a distribution that changes the installation steps. – kiamlaluno Jan 3 '13 at 14:46
  • The best I've found so far is drupal.org/project/demo_profile that does some tricks early on. – tsvenson Jan 3 '13 at 15:11
  • I answered a similar question here. drupal.stackexchange.com/questions/26460/… Basically you want hook_install_tasks_alter. drupal's hook_form_alter doesnt work in the install process (see my comments in my Gist) so you'll have to build your page's form with your own form function and validation/submit handlers. – tenken Jan 3 '13 at 15:56

Your Answer

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

Browse other questions tagged or ask your own question.