I have an instance of FCKEditor running in a Facebox, and when the form is submitted, all the other fields POST properly, but the FCKEditor one does not.
Form code:
Processing code:
Facebox code:
If I print_r() the $_POST array, all the indexes are populated EXCEPT the FCKEditor one. Any ideas? I just can't figure out why it's not playing nice with Facebox.
Form code:
<div id="pageEditorEdit" style="display:none">
<form method="post" action="<?php $_SERVER['SCRIPT_NAME']; ?>">
<fieldset>
<label for="pageEditorTitle">Page Title</label>
<input type="text" id="pageEditorTitle" name="pageEditorTitle" />
<div style="clear:both"></div>
<label for="pageEditorFilename">Filename</label>
<input type="text" id="pageEditorFilename" name="pageEditorFilename" /><p>.html</p>
<?php
$oFCKeditor = new FCKeditor('pageEditorContent');
$oFCKeditor->BasePath = 'assets/fckeditor/';
$oFCKeditor->ToolbarSet = 'DIY';
$oFCKeditor->Create();
?>
<input type="submit" id="pageEditorSubmit" name="pageEditorSubmit" value="Submit" />
</fieldset>
</form>
</div>Processing code:
if(isset($_POST['pageEditorSubmit'])) {
$pageEditorTitle = htmlspecialchars(trim($_POST['pageEditorTitle']));
$pageEditorFilename = htmlspecialchars(trim($_POST['pageEditorFilename']));
$pageEditorContent = htmlspecialchars(trim($_POST['pageEditorContent']));
$a->rqNotEmpty($pageEditorTitle, 'pageEditorTitle');
$a->rqNotEmpty($pageEditorFilename, 'pageEditorFilename');
$a->rqNotEmpty($pageEditorContent, 'pageEditorContent');
if($form->totalErrors == 0) {
$query= "INSERT INTO tbl_pages (title,filename,content) VALUES('{$a->clean['pageEditorTitle']}','{$a->clean['pageEditorFilename']}','{$a->clean['pageEditorContent']}')";
$a->query($query);
echo 'Tada!';
print_r($_POST);
}else{
echo 'Wah wah.';
}
}Facebox code:
jQuery('a[rel*=facebox]').facebox()
<a href="#pageEditorEdit" rel="facebox[.pageEditorModal]">[EDIT]</a>If I print_r() the $_POST array, all the indexes are populated EXCEPT the FCKEditor one. Any ideas? I just can't figure out why it's not playing nice with Facebox.

Re: $_POST empty when submitted
Re: $_POST empty when submitted
Re: $_POST empty when submitted
$('#formsave').click(function(){ var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; save_form(oEditor.GetHTML()); $(document).trigger('close.facebox'); return false; }); });