1

How do I add the Drupal site wide contact form to the maintenance page?

I'm currently using a custom maintenance-page.tpl.php template page in my theme.

2 Answers 2

2

I would try to override the default template file through maintenance-page.tpl.php and then use template_preprocess_maintenance_page to alter the variables stack and basically add the rendered form as a variable. But I don't know what would happen if you submit the form while in maintenance.

1
  • Thanks for the reply. Not quite sure how to do that.. I little over me head. I'll look for another way. Commented Feb 2, 2012 at 22:10
1

I'm not sure if this is possible directly in Drupal. On my sites, I use an external form for this job. That is, it's not a Drupal form. You could use e.g. http://www.free-php.net/410/recaptcha-contact-form/. Just put the ContactForm folder in your Drupal root folder, and you'll be able to link to yoursite.com/ContactForm/contact.php from your maintenance page (edit your maintenance-page.tpl.php file to do this). (Well, there is some minor configuration to do, and you may want to edit the style.css as well. For instance, I did not like the text-transform that's used here...)

A benefit is that the mentioned form actually uses reCaptcha to stop spam, and you'll be able to use the keys you've already created for your site, as the form is placed within your Drupal root folder.

Works for me, even if a solution through Drupal would've been preferable (less extra configuration...). Hopefully someone finds this helpful.

1
  • How can you use an external form to show the Drupal site wide contact form?
    – avpaderno
    Commented Apr 3, 2012 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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