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

<?php
/**
* 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

Sorry the version is 7.1

Status:Active» Fixed

I 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.

let me try 7.x-1.x-dev ! thank you for responding.
So my code is Ok?i guess.

@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!

<?php
  $output
.='<a href="freechuz/product/'.$product_id.'">Get coupon</a>';
?>

Oh 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:

<?php
$output
.= l(t('Get coupon'), 'freechuz/product/' . $product_id);
?>

Wow 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.

<?php
// on header of  page.tpl.php
if( !user_is_logged_in()){
    
//popup the modal form
}
?>

Thank you very much,this thing was driving me crazy.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.