Forums

HTML Editor for TextArea

Larion476 05 Jul, 2011
How can I add an HTML Editor to a textarea field
GreyHead 05 Jul, 2011
Hi Larion476,

Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.

Bob
Larion476 06 Jul, 2011
I am using version 4.0 RC1.9 on Joomla 1.5.23
Larion476 06 Jul, 2011
I found the solution in the FAQ Forum. GreyHead had posted it on Feb 13 2011.😀
I am reproducing the gist of it here:
Open the Form Editor by clicking the 'Form Name' link in the ChronoForms Forms Manager; click the Form Code tab and look for the following in the HTML code.
    <div class="form_item">
      <div class="form_element cf_textarea">
        <label class="cf_label" style="width: 150px;">Click Me to Edit</label>
        <textarea class="cf_inputbox" rows="3" id="text_0" title="" cols="30" name="text_0"></textarea>
       
      </div>
      <div class="cfclear"> </div>
    </div>

Delete this lne
    <textarea class="cf_inputbox" rows="3" id="text_0" title="" cols="30" name="text_0"></textarea>

And replace it with this
    <?php
    $editor =& JFactory::getEditor();
    echo $editor->display( 'text_0', '', '80%', '350', '55', '30', false ) ;
    ?>

Note that 'text_0' needs to match the name of the texta rea that is being replaced.
Thanks to GreyHead for the snippet
GreyHead 07 Jul, 2011
Hi Larion476,

Well found, and good to know that still works with Joomla! 1.6.

With CFv4 it's probably simpler to use Custom Element with the PHP snippet in it, that saves having to edit the Form HTML.

Bob
Larion476 07 Jul, 2011
Hi Bob,

Just to let you know, I am using Joomla 1.5.23. I hope I am using the right version of ChromoForms!

Please advise.
GreyHead 07 Jul, 2011
Hi Larion476 ,

Sorry, my mistake - that's fine.

Bob
This topic is locked and no more replies can be posted.