Forums

How to use WYSIWYG editor as an input field

danzenie 23 Sep, 2007
Hello,

How do I go about using my default WYSIWYG editor (JCE) as an input field in one of my forms?

Thanks in advance for any help.
danzenie 23 Sep, 2007
OK, so I've read that you can't include a mambot (JCE) within a component (ChronoForm). But is there any way, shape, form, or hack to allow the use of JCE.
Max_admin 23 Sep, 2007
Hi Danzenie,

If enabling mambots will solve it then you can enable mambots in the component at the latest release v2.3.4, choose enable mambots in the form edit page!!🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
danzenie 23 Sep, 2007
Thank you Mr. admin. Although getting mambots enable is only a first step of many in what I'm trying to accomplished. In any case I will upgrade to the latest version. I hate to ask a completely different question on the same post, but do you have a link for an upgrade process from 2.3 to 2.3.4?
Max_admin 23 Sep, 2007
No worries!! Just replace all files/folders, take care to have a backup😉

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
danzenie 24 Sep, 2007
Thank you again Mr. Admin.

OK. I searched the joomla forum, and found how to display JCE as part of my form. Here is the piece of code:

<?php
  // parameters : areaname, content, hidden field, width, height, rows, cols
  editorArea( 'editor1',  "$row->misc1" , 'misc1', '100%;', '300', '75', '20' ) ; ?>


The editor window shows up (for registered users only). Now, the value of the editor's field, 'misc', is not emailed automatically. What is the best way to get this value emailed? I can actually see the value by using $_POST['misc1'], but what would be my next step for getting this value.

On another note, does anyone know how to get JCE displayed for guests? I tried changing the access level on the plugins, but this is not working.

T.I.A
Max_admin 24 Sep, 2007
Hi danzenie,

Thank you! yes the editor result won't appear this way, you can come over that by using the email template option and add this to your template: $_POST['misc1']😉

The editor appears for registerd users only I think because of some lines at the top of your template file (and most of template files) :


<?php
if ( $my->id ) {
	initEditor();
}
?>


try to remove it ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
danzenie 24 Sep, 2007
You're genius Mr. Admin!!!

If I could I would kiss you.... on the cheek.

Now, taking a look at this issue from a use or call to unnecessary resources perspective... While removing the conditional statement around the initEditor() call thats on my template allows me to use the wysiwyg editor in my form, this also means that the call will be issued for each and every page that is viewed on my site. I don't know how much of a resource hog is this function call, but in a generalized sense this does not look like "good" programming practice. So instead of removing the conditional statement, I'm thiking something like

<?php
  if ( $my->id || page == "chronoform page"«») {

    initEditor();

}
?>


What condition can I use to tell that I'm on the chronoform page?
Max_admin 25 Sep, 2007
Thanks danzenie B)

it should be something like this : $option == 'com_chronocontact'

Best regards,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
danzenie 25 Sep, 2007
Done!!

Form is working perfectly with JCE, and I get the editor's content in my email. This is great!!! Hope this thread helps others.
Max_admin 25 Sep, 2007
Great, Thanks Danzenie!!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Campbell 08 May, 2008
Hi,

I am using fckeditor and would like to keep using it.

But I am a bit of a dumbo about where to add the code to enable the editor.
I am scared to change the code as I might lock myself out....

I place the code in the admin template?
Which one the system.php or component.php?
For example I am in: H:\webserver\Joomla15\administrator\templates\system\

Am I even in the right place? Or should I be in the chrono directory: H:\webserver\Joomla15\components\com_chronocontact\


Told ya I was dumb!

Thanks
GreyHead 08 May, 2008
Hi Campbell,

If you want to use it as a form editor then I'd put it in the form html for your form.

Bob
Campbell 09 May, 2008
Hi,
I would like to use it in the form design page where the author creates the form.

When the form is completed and submitted by the end users/visitors it would not be available.

thanks
Colin
GreyHead 09 May, 2008
Hi Colin,

Then admin.chronocontact.html.php is the place to go.

Be a little careful though, some editors do strange things with the code in translating it into html. Best to do a final check in html view.

Bob
kai920 16 May, 2008
I can't get the WYSIWYG editor to show up. I am also using JCE, but on a 1.5.x installation - not sure if the original poster was also on 1.5.

I tried as suggested:

editorArea( 'editor1',  "$row->misc1" , 'misc1', '100%;', '300', '75', '20' ) ; ?>


But I received a "undefined function editorArea()" error.
Max_admin 17 May, 2008
Try to see what replaced this function in joomla 1.5 then, I have no idea really!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 18 May, 2008
Hi kai920,

The equivalent in Joomla 1.5 appears to be
<?php
// parameters : areaname, content, width, height, cols, rows
echo $editor->display( 'text',  $row->text , '100%', '550', '75', '20' ) ;
?>
but I'm not sure how $editor is defined.

Bob
nesomis 13 Apr, 2013
Hi to all!
I try to use Editor - JCE in text area, but... something goes wrong😟
Where to put this code above? Is it some file or some element?
thanks in advance.
GreyHead 13 Apr, 2013
Hi nesomis,

This thread is five years old and refers to a very old version of ChronoForms.

Which version of ChronoForms are you using and what exactly so you need to do?

Bob
nesomis 13 Apr, 2013
Hi GrayHead,

Version is Chronoforms_V4_RC3.5.1_J1.5
I want to use JCE editor in Text Area.



Buttons are not shown in text area.

What am I missing?

Thanks for support.
GreyHead 13 Apr, 2013
Hi nesomis,

I think it works like this.

In the admin area ChronoForms always uses TinyMCE. The textarea settings will enable the user's default Rich Text Editor. So you'd need to set JCE as the default editor for the user or the user group.

This works OK - I have the JCK Editor set as my default editor on the ChronoEngine Joomla site.

If it's not working then there may be some problem with JavaScript on the page or the editor settings.

Bob
nesomis 13 Apr, 2013
Thanks for help.

All editors do not work. JCE, JCK, TinyMCE. Every time when set one of them as default editor nothing's changed. My site works on Joomla 1.5.25 without other extensions.
GreyHead 13 Apr, 2013
Hi nesomis,

Hmmm, with Joomla 1.5 I don't remember now. It's probably possible but I think that you'd have to add the JavaScript to attach the editor to the textarea using custom code.

Bob
nesomis 14 Apr, 2013
Problem is with my Joomla, not with ChronoForms extension. Thanks for Your time and attention.

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