Closed (fixed)
Project:
Popups API (Ajax Dialogs) [D7]
Version:
6.x-1.3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2010 at 06:13 UTC
Updated:
13 Sep 2011 at 06:39 UTC
I have a standard drupal menu using local tasks (menu tabs) and want to have a popups modal form appear when the user clicks the local task button.
Currently the button (tab, link, whatever) yields a simple drupal form which overlays the existing page. But I love the modal popup forms. They take up less space and you can see the form in the context of the page that sourced it and I understand that you can drag them around so you can get even better access to the source page. But I can't see how to incorporate the link from the hook_menu to the popup api.
My question is how do I get to a popup form from the standard hook_menu?
Comments
Comment #1
Tokoh commentedI posted this seven weeks ago and have had no response. I'm amazed noone else has an interest in this topic but it was around the silly season so maybe everyone was into Chistmas pud.
I have a simple requirement. I have a standard menu tab (local task) and it pulls up a simple Drupal form constructed using the FAPI. Only instead of the usual page form I want to use a popup form with the Popup API.
The call looks like this:
function wma_order_menu() {
$menu['order/add'] = array(
'title' => 'Add Order',
'page callback' => 'drupal_get_form',
'page arguments' => array('wma_order_add_form'),
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
'weight' => 350,
);
.........
How do I change this menu to invoke the form (wma_order_add_form) as a popup?
Comment #2
r3z0nate commentedAre you still looking for help on this?
You need to create a link to your form with a class that includes popups.
Comment #3
sidrasultana commentedHow can i call a drupal pop up on any link?
Comment #4
sidrasultana commentedget it working by using 'attributes' => array('rel' => 'gb_page_center[400,350]'),