1
Hello,
While developing a module I wanted to use koivi editor, I noticed that koivi editor didn't pass the content that I entered with Koivi editor. The following is the code I use.
What mistake I did in the code? Would you please help me?
Thanks
require('../../mainfile.php');
require(XOOPS_ROOT_PATH.'/header.php');
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$sample_form = new XoopsThemeForm('', 'tutorial_form', "index.php");
$sample_form->setExtra('enctype="multipart/form-data"');
include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/koivi/formwysiwygtextarea.php');
$editor = new XoopsFormWysiwygTextArea('Message', 'msg', $msg, '40%', '450px', '');
$sample_form->addElement($editor,false);
$submit = new XoopsFormButton('', 'submit', "submit", 'submit');
$sample_form->addElement($submit,false);
$sample_form->display();
if (isset($_POST['submit'])) {
$message=$_POST['msg'];
echo 'msg: '.$message;
}
require(XOOPS_ROOT_PATH.'/footer.php');
?>
PS: This error was generated:
Warning: Invalid argument supplied for foreach() in file /class/xoopseditor/koivi/formwysiwygtextarea.php line 51