Drupal 7 Modal Forms (with Ctools) module

By shane
Mon, 2013-01-21 23:21
13 comments
Daily Dose of Drupal Episode #91

Share with Others

If you need to launch a Drupal form inside a JavaScript dialog or popup window, the Drupal 7 Modal Forms (with Ctools). The module seamlessly works with the User registration, User login, Password reset, contact form, and comment form.

In this episode you will learn:

  • How to configure the Modal Forms module to work with the various user forms
  • How to configure the Modal Forms module to work with the comment form

Comments

thank you so much for the tutorial... i was wondering if it´s possible to insert another form in the modal form... like a webform content for example? how do I do that? thanks...

hi... very nice tutorial.. thanks again..
could you teach us how to do a webform in a modal popup using a URL custom page as confirmation page? That would be great..!

After more playing around with the coding, I realized I needed to simplify my URL definition. Problem solved! Love the way this works now and much better than other options I researched.

Please tell us even where to write :

$links[] = ctools_modal_text_button(t('Modal Login'), 'modal_forms/nojs/login', t('Login via modal'));
$links[] = ctools_modal_text_button(t('Modal Login'), 'modal_forms/nojs/login', t('Login via modal'), 'ctools-modal-modal-popup-small');

witch file and under witch line

Followed the step-by-step installation of modal forms as shown. Created a login link and a contact link. In both cases got a modal window with no content, just the spinning loading image. I am using the dev version of modal forms 7.x-1.x-dev. Running drupal version 7.38 and ctools version 7.x-1.7. Anyone else have this problem? It seems so straight forward in the video but I haven't been able to get this up and running.

Post new comment