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

Save custom advanced editor content to a database.

Overview

The custom text area was placed outside the form element, preventing its data from being submitted.
Move the custom HTML code from the setup tab to the design tab in CF to ensure it is within the form tags.

Answered
ChronoForms v5
jp 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);
?>
he healyhatman 24 Dec, 2018
Does the generated HTML include a field NAME?
Gr 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
he healyhatman 26 Dec, 2018
Also make sure the generated field is within the form tags
jp 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.