joomla3.0 - passing variable as hidden from default.php is not working - joomla 3 -


hi im new on module development. need know how pass variable tmpl/default.php mod_.php since couldnt achive tutorials have reffered. how used:

 tmpl/default.php (not full code)     <form action="index.php" method="post" id="sc_form">     <input type="hidden" name="form_send" value="send" />     <label>your name:</label><br/>     <input type="text" name="your_name" value="" size="40" /><br/><br/>      <label>your question:</label><br/>     <textarea name="your_question" rows="5" cols="30"></textarea><br/><br/>      <input type="submit" name="send" value="send" />      </form>     ----------------------------------------------------------------------------------- 

mod_modulename.php

   $form_send = jrequest::getvar('form_send', 'notsend');      switch($form_send){      case 'send':          require(jmodulehelper::getlayoutpath('mod_<module_name>', 'sendok'));     break;      default:     require(jmodulehelper::getlayoutpath('mod_<module_name>', 'default')); 

}

thank very consideration. great great me...

the jrequest method deprecated in 3. use jinput instead. ex:

$input = jfactory::getapplication()->input; $form_send  = $input->get('form_send', 'notsend'); 

hope helps


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -