TinyMCE in custom form

I have modified the invite a friend page to suit my needs, but the client does not like the standard textarea box, as he wants users to be able to format their text.So,I have been trying to figure out how to implement the standard tinyMCE from dolphin to take effect on my page.

Specifics:

Again,I am using a modified version of the invite a friend. Basically, all i did was change the email field to a textarea and remove the name and email fields.

This is the field info:

        'subjective' => array(
            'type' => 'textarea',
            'name' => 'subjective',
            'caption' => _t("Subjective"),
            'value' => $Subjective_data,
            'required' => true,
            'html' => 2,
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 4555),
                'error' => _t('_sys_adm_form_err_required_field'),
            ),
        ),

This is from my variables:


$_page['css_name']        = array('forms_adv.css');
$_page['js_name']        = array('http://www.myther.com/plugins/tiny_mce/tiny_mce.js');

 

Since it is not displaying as a tinymce, of course it isnt working. but this is what I do get.

After adding 'html' => 2,

I now have to double click the link to get the popup to open - instead of a single click like it was before without the added code.

Plus - the open field is now extending way paste the right edge of the block - and even after widening in forms_adv.css

Also - while trying to get things to work - i kept getting header conflict.

// output AJAX form submission result
if (bx_get('BxAjaxSubmit')) {
    header('Content-type:text/html;charset=utf-8');
    echo $sPageCode;
    exit;
}

$sPageCode = $GLOBALS['oSysTemplate']->parseHtmlByName('default_margin.html', array('content' => $sPageCode));


// output ajax popup
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
    $aVarsPopup = array (
        'title' => $_page['header'],
        'content' => $sPageCode,
    );
    header('Content-type:text/html;charset=utf-8');
    echo $GLOBALS['oFunctions']->transBox($GLOBALS['oSysTemplate']->parseHtmlByName('popup-client-chart.html', $aVarsPopup), true);
    exit;
}

it seems to me that those in red should be set as multipart/form-data.

I just tried something that gave me some progress - Instead of 'html' => 2, I changed the 2 to true, and now i it doesnt stretch wider than the box, and it even added the scroll bar - this is cool.

But let me explain why i want the tinymce - or at least a limited functioning one. When a user enters data into that field, I need to keep formatting such as line breaks and new paragraphs. If this can be done without all the extra stuff at the top - that would be great, but just to get anything to work would be great at this point.

first pic is the html => 2; second pic is the html => true

But as you can see in each pic - the field is remembering the formatting (i dont know how i got that part to work) - and you can see in the 3rd pic that the formatting is lost when displaying the data

As always - Thanks in advance.

 

EDIT

In my pics, I am referring to the section on the right - sorry, i have dual screens and didnt realize the screenshot would pick up both screens

subjective box expansion.png · 527.5K · 256 views
subjective html = true output.png · 517.9K · 289 views
subjective output in page.png · 804.4K · 263 views
caredesign.net
Quote · 26 Feb 2013

Try to add:

'html_dynamic' => true,

just below:

'html' => 2,

Rules → http://www.boonex.com/terms
Quote · 28 Feb 2013

My apologies for hijacking the thread; however, my topic is on TinyMCE; anyone care to answer mine: http://www.boonex.com/forums/?action=goto&my_threads=1#topic/Profile-Comments-TinyMCE.htm

Geeks, making the world a better place
Quote · 28 Feb 2013

that almost worked like a charm, Alex - Thank you very very very very much. But unfortunately, now the client does not want the popups, so I have to use iframes. I was looking at the BxDolForm page and trying to see how to create a custom form. My biggest problem in creating anything new using dolphin templates, is that I dont quite know what is supposed to go at the top of the page - which other pages are required. I will continue to work on things and if i run into problems i will post.

Thanks again.

caredesign.net
Quote · 28 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.