2
Hi all,
Sugar, aka RB , the Author of the magazine module is so nice that he provided me some hints at our local support site. Finally, I have solved the problem. Here is the summary of the solution :
1. Using xoopsform methods , create the prefered form eg include/form.inc.php :
$form = new XoopsThemeForm($formTitle, "categoryform", $formAction, "POST");
$form->addElement(new XoopsFormText(_MD_XINVENTORY_CATEGORY_NAME, "catname", 30, 60,$catNameValue),true );
[color=0000FF]return $categoryForm->render();[/color]
?>
2.In the php script eg submit.php where you need to use this form
//codes ......
$xoopsOption['template_main'] = xinventory_category.html";
include "../../header.php";
//----------------
$form = include "include/form.inc.php";
$xoopsTpl->assign('form',$form);
//---------------
?>
3. Finally, in the smarty temmplate , ie templates/xinventory_category.html :
<{$form}>
One more interest thing is that, I cannot not use $form->insertBreak() in "include/form.inc.php" if I don't use $form->display(); but the above solution can get rid of this.
Hope this helps others !
Regards
Cody