Welcome, Guest
  • Page:
  • 1

TOPIC: WYSIWYG editor in form

WYSIWYG editor in form 2 years, 3 months ago #11607

Hi

I am a big fan of FacileForms and now BreezingForms. I do have soe grat working forms made with this component, but now hit a wall.

I do have WYSIWYG editor fields in may forms, and they work using simple scripts to initiate editor area (after moving to Joomla 1.5):

function wy_editorArea($ename, $content, $hidden, $width, $height, $cols, $lines)
{
global $ff_processor;
ob_start();
$editor = &JFactory::getEditor();
echo $editor->display($ename.'_hidden', $content, $width, $height, $cols, $lines, false);
$html = ob_get_contents();
ob_end_clean();
if ($ff_processor->form_id != 'adminForm')
$html = preg_replace('/adminForm/', $ff_processor->form_id, $html);
return $html;
} // wy_editorArea


and geting text back:

function wy_getText($ename, $fname)
{
global $ff_processor;
$editor = &JFactory::getEditor();
ob_start();
echo $editor->save($ename.'_hidden');
$html = ob_get_contents();
ob_end_clean();
if ($ff_processor->form_id != 'adminForm')
$html = preg_replace('/adminForm/', $ff_processor->form_id, $html);
return
$html."\n".
" ff_getElementByName('$fname').value = \n".
" document.".$ff_processor->form_id.".".$ename."_hidden.value;\n";
} // wy_getText


And here i got a problem, while, previously i have been reciving text with all formatting tags, now i am getting it completly clean, no tags at all, just plain text. Where is the error?

TP
  • TruePepe
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: WYSIWYG editor in form 2 years, 3 months ago #11632

Hi,

that is a "feature". BF (and Joomla) filters tags from messages from frontend submissions. This is to prevent security issues (you could grab session data if a script tag would make it through).

I was often asked for this feature but I am still a little bit reluctant to add it.

I will first do a bigger update on breezingforms and then trying to find a proper way to address this requirement.

Until then I can only suggest - if you really need it - to add a corehack that removes the filtering __safely__.
See the facileforms.process.php for such a core hack.

Regards,
Markus
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re: WYSIWYG editor in form 2 years, 3 months ago #11649

A hint where facileforms.process.php is placed in the system?
  • TruePepe
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: WYSIWYG editor in form 2 years, 3 months ago #11654

...sure, sorry:

/components/com_facileforms/facileforms.process.php

If you need help, please let me know.
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re: WYSIWYG editor in form 2 years, 3 months ago #11718

Well, that's not so simple, i see. My idea is to allow only some specific tags, strictly formatting (like <strong> or <em>), I was looking for some regular expression search, haven't found. Can you suggest me the line number for the hack? (there is almost 5 thousand lines of code:)
  • TruePepe
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: WYSIWYG editor in form 2 years, 3 months ago #11814

Well
Joomla native tag filtering have feature called "white list" which perfectly works for articles edited on the front end. Setting "allowed" tags this way in editor located in the BreezingForms don't look like working, please let me know, where is really placed filtering in the component
  • TruePepe
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 1.27 seconds

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint