I have a custom module in Drupal and I also have a custom table for storing the details of seminars, such as name, description, date and location.

I am showing the names of the seminars in a left sidebar block; when the user clicks on a seminar name, I want to show its other details (description, location, etc.) in a form (which include a "Submit" button) in a popup modal box.

When the user clicks on the submit button, the user will be joined in the seminar (inserted into database).

How can I use JavaScript/AJAX for this scenario and process form in popup, without refreshing the page?

I have included the jQuery library in my module file using drupal_add_js(); I also installed the Chaos Tools Suite module.

  • Drupal 6 or 7??
    – googletorp
    May 30, 2011 at 18:10

1 Answer 1


I would suggest you to have a look at Chaos tools suite; the module brings an example for a modal form inside a modal window right with it (AJAX example).
It should be not to hard to integrate that, if you're already working on a custom module.

All I've said is valid for Drupal 6; I haven't looked into cTools in Drupal 7.

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.