using fckeditor on txtarea

A place for users and developers of the Xataface to discuss and receive support.

using fckeditor on txtarea

Postby fantomasdm » Fri Mar 14, 2008 6:41 am

Hi, How can I use fckeditor inside php code for txtarea in action form?

example:
class actions_insertFromBarCode {
function handle(&$params){
$form="";
df_display($form, 'test.html');
}
}

Thank for help!!!
Sorry for my English!!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Fri Mar 14, 2008 6:06 pm

Not sure exactly what you're trying to do. There are a few problems with your code sample that jump right out.

First of all, the first parameter for df_display() should be an array:

e.g.
Code: Select all
df_display(array('form'=>$form), 'test.html');


Next, for the FCKeditor. Are you editing a record in the database or are you making a custom form where the field isn't particularly bound to a field in the database.

i.e. Are you basically recreating the edit form for a record, or is this action doing something different?

If you are recreating the edit form for a record, then you may want to check out the df_create_edit_record_form function.

If you are building a form for other purposes, you could still use the df_create_edit_record_form() function as a basis.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Sat Mar 15, 2008 6:21 am

Hi! I'm in second case, building a form for other purposes (Send an email to all students in a course)
I have using class HTML_QuickForm_htmlarea
in this way
Code: Select all
$form_html = "
";
      $form_html .= "
                       

                        ";      
      $form_html .= "
";//
";
         $txtArea =& new HTML_QuickForm_htmlarea("testo","Corpo:");
         $form_html .= $txtArea->toHtml();


      $form_html .= "
";
df_display(array('form'=>$form_html), 'ModuloM1.html');

and seems to me that all works!! Thanks for help!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Sat Mar 15, 2008 10:21 am

Glad to hear it's working.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved