Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i dont know what i am doing wrong.
what i need is to open a form withing a modal..but when i click the link,it just opens in a normal way.
I am using version 7.0
here is the sample code
/**
* Implement hook_menu().
*/
function freechuzkupon_menu() {
$items['freechuz/product/%'] = array(
'title' => 'get coupon for free',
'description' =>'Coupons as requested by users.',
'page callback' => 'drupal_get_form',
'page arguments' => array('freechuz_get_kupon_form',2),
'access arguments' => array('access content'),
'modal'=>TRUE,
'type' =>MENU_NORMAL_ITEM,
);
return $items;
}
Comments
Comment #1
mrcniceguy CreditAttribution: mrcniceguy commentedSorry the version is 7.1
Comment #2
Dave ReidI committed a fix last week to the 7.x-1.x-dev to menu callbacks with a pure wildcard and no load callbacks, like yours does. If you download 7.x-1.x-dev it should work for you.
Comment #3
mrcniceguy CreditAttribution: mrcniceguy commentedlet me try 7.x-1.x-dev ! thank you for responding.
So my code is Ok?i guess.
Comment #4
mrcniceguy CreditAttribution: mrcniceguy commented@Dave Reid ,i have tried the 7.x-1.x-dev also nothing works((
first i deleted the one existing,installed 7.x-1.x-dev... cleared the cache, tried to click the link and nothing happens again,it takes me to the normal page as usual.
here is how am calling the link, may be am doing something wrong!
Comment #5
Dave ReidOh yeah, you have to use the proper functions to output links, otherwise the module doesn't have a chance to rewrite them. In your case you would be using:
Comment #6
mrcniceguy CreditAttribution: mrcniceguy commentedWow thankx,now it works like a charm.
Now i am wondering, how to make the user login page to popup like this, but when user is not logged.
I mean on page load, if the user is anonymous the login page to popup.
Thank you very much,this thing was driving me crazy.