How to use WYSIWYG editor as an input field

Post any questions you may have here

How to use WYSIWYG editor as an input field

Postby danzenie on Sun Sep 23, 2007 12:05 am

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.
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby danzenie on Sun Sep 23, 2007 8:54 am

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.
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby admin on Sun Sep 23, 2007 10:27 am

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
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am

Re:How to use WYSIWYG editor as an input field

Postby danzenie on Sun Sep 23, 2007 11:19 am

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?
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby admin on Sun Sep 23, 2007 6:15 pm

No worries!! Just replace all files/folders, take care to have a backup ;)

Cheers

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am

Re:How to use WYSIWYG editor as an input field

Postby danzenie on Mon Sep 24, 2007 1:47 am

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:
Code: Select all
<?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
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby admin on Mon Sep 24, 2007 7:14 pm

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) :

Code: Select all
<?php
if ( $my->id ) {
   initEditor();
}
?>


try to remove it ?
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am

Re:How to use WYSIWYG editor as an input field

Postby danzenie on Mon Sep 24, 2007 11:17 pm

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

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

    initEditor();

}
?>


What condition can I use to tell that I'm on the chronoform page?
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby admin on Tue Sep 25, 2007 1:10 am

Thanks danzenie B)

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

Best regards,

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am

Re:How to use WYSIWYG editor as an input field

Postby danzenie on Tue Sep 25, 2007 5:36 am

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.
Frank Costello: How's your mother?
Man in Bar: She's on her way out.
Frank Costello: We all are, act accordingly.
--------------------------
http://joomlathug.com
danzenie
Fresh Boarder
 
Posts: 13
Joined: Sun Sep 09, 2007 5:22 pm

Re:How to use WYSIWYG editor as an input field

Postby admin on Tue Sep 25, 2007 6:51 pm

Great, Thanks Danzenie!!

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am

Re:How to use WYSIWYG editor as an input field

Postby Campbell on Thu May 08, 2008 4:30 am

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
Campbell
Fresh Boarder
 
Posts: 2
Joined: Thu May 08, 2008 4:23 am

Re:How to use WYSIWYG editor as an input field

Postby GreyHead on Thu May 08, 2008 11:23 am

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
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3437
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:How to use WYSIWYG editor as an input field

Postby Campbell on Fri May 09, 2008 7:00 am

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
Campbell
Fresh Boarder
 
Posts: 2
Joined: Thu May 08, 2008 4:23 am

Re:How to use WYSIWYG editor as an input field

Postby GreyHead on Fri May 09, 2008 8:28 am

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
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3437
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Next

Return to ChronoForms Questions & Answers

Who is online

Users browsing this forum: GreyHead, MSNbot Media, Yahoo [Bot] and 7 guests