We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Creating a Rich Text Field in a Shared Form View does not update the textarea field on submit

Development and Programming

dmDev08's avatar
dmDev08
100 posts
9 years ago
dmDev08's avatar dmDev08

I’ve created a rich text area in my form in my Module’s control panel page. But when I change anything in the rich text field and submit the form, the changes are not submitted. It simply submits whatever was in the form on initial page load.

This code correctly shows a rich text field, but never updates the content.

ee()->load->add_package_path( PATH_MOD . "rte/" );
 ee()->load->library( array( "javascript", "rte_lib" ) );

 ee()->javascript->output(
  ee()->rte_lib->build_js( 0, ".richTextField", NULL, (REQ == "CP" ) )
 );

 $settings[] = array(
  "title" => "My Text Area",
  "fields" => array(
   "mytextarea" => array(
    "type" => "textarea",
    "value" => $savedValue,
    "required" => true,
    "attrs" => ' class="richTextField"'
   )
  )
 );

Using 3.0.4

       
dmDev08's avatar
dmDev08
100 posts
9 years ago
dmDev08's avatar dmDev08

Got this solved. The textarea was getting messed up by having two textareas (one in each tab) that were accidentally named the same.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.