1

I want to show the contact form in popup. How should I actually do it? I tried to create a module and call the function in it. But I am confused on how to implement *hook_block_view()*

Is there any other way to this?

This is my first drupal project. And later do I realize that I am not having template.php in my theme folder.

This is what I have done.
1. I had made a block in my page, named 'popup_this'.
2. I made a module named 'popup' and made to display in this block.
3. I had activate the module named 'contact' in the site. It is called in the link '?q=contact'.
4. I am trying to call this form in my custom module.

I don't know how to implement the function popup_block_view().

Thanking you in advance

  • Is your contact form a node? – Alex Gill Oct 25 '12 at 13:45
  • Welcome to SO! Please add as much as information you can - for example, what was the module you used ? is "creating the first module" your question or "how to show a page in a popup" your question ? – AyeshK Oct 25 '12 at 14:54
0

You don't need to write a custom module. You can use the popups api module. All you will have to do is assign the link a class called as "popups". Refer to the api if you want to do it the custom way as well using the popup api.

Summary of the module

API for building modal ajax dialogs. Its focus is on putting forms inside of ajax popup dialogs. Current example can present pages as popups (of the lightbox type). This is amazingly useful for things like confirmation pages. And the best part is it can be applied retroactively to a page without needing to modify the generating module, and (of course) it degrades gracefully.

0

The Ctoosl Modal module, included on the ctools project, is the most popular way to popup modal forms on Drupal, with lots of addon modules. One of those addon modules is the modal_forms module which directly supports popup contact forms.

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.