"0" , "style" => "1" , "layer" => "0" , "table" => "0" , "clear_entities"=>"0" );echo $editor->display( "RoadMap", $form->data['RoadMap'], "400", "400", "20", "20", false);?>"> Custom text area with advanced editor doesn't save to db - Forums

Forums

Custom text area with advanced editor doesn't save to db

jpurlings 24 Dec, 2018
Hi,

I have added a text area to a form with an advanced editor using the code below. I want to save the content of the text area to my db using a DBSave. It worked when I had a text area on the designer tab. But with the custom text area from below, DB save doesn't save the content in the database. The field of the corresponding table in the database is called RoadMap. What am I doing wrong?

Thanks!
<?php
$editor =JFactory::getEditor();
$params = array( "smilies"=> "0" ,
"style" => "1" ,
"layer" => "0" ,
"table" => "0" ,
"clear_entities"=>"0"
);
echo $editor->display( "RoadMap", $form->data['RoadMap'], "400", "400", "20", "20", false);
?>
healyhatman 24 Dec, 2018
Does the generated HTML include a field NAME?
GreyHead 26 Dec, 2018
Answer
HI jspurlings,

Add a Debugger action - or check your browser web developer tools to see what is actually being submitted and what the name is in the form data array.

Bob
healyhatman 26 Dec, 2018
Also make sure the generated field is within the form tags
jpurlings 27 Dec, 2018
Hi,

Thanks for the answers. The question if the textarea was within the form-element solved it for me. I placed the custom html on the setup tab in Chronoforms. It should be on the design tab, than it is within the form element.

Thank you!
This topic is locked and no more replies can be posted.