Hello
I would like to have a form for the users of our site to send in embed codes for video's they want to see on the site. Now the form just ignores / omits all code entered in the form.
How do I make the form ignore it as html, and just reads it as text so we can receive it in our mailboxes as the embed code it should be?
Thanks for the help
Diana
I would like to have a form for the users of our site to send in embed codes for video's they want to see on the site. Now the form just ignores / omits all code entered in the form.
How do I make the form ignore it as html, and just reads it as text so we can receive it in our mailboxes as the embed code it should be?
Thanks for the help
Diana
Hi Diana,
Sorry, I don't know how you'd do that. It seems that the HTML is stripped even if I add it directly into the Email template :-(
Bob
Sorry, I don't know how you'd do that. It seems that the HTML is stripped even if I add it directly into the Email template :-(
Bob
thx for looking into it!
i hope someone else does find a work around though... ?
I suspect there will be some coding that needs to be done...
I guess for now I will have to change it to making them send the location of the video, will be more work for me though...😟
i hope someone else does find a work around though... ?
I suspect there will be some coding that needs to be done...
I guess for now I will have to change it to making them send the location of the video, will be more work for me though...😟
Hi,
I believe the best workaround is to write the form data into a temporary file, which you then manually attach to the email. Something along these lines (used in the on submit - before email) should do the trick:
/Fredrik
I believe the best workaround is to write the form data into a temporary file, which you then manually attach to the email. Something along these lines (used in the on submit - before email) should do the trick:
<?
$MyForm =& CFChronoForm::getInstance("formname");
$MyUploads =& CFUploads::getInstance($MyForm->formrow->id);
$config =& JFactory::getConfig();
$tmpfname = $config->getValue('config.tmp_path').DS.uniqid('txt');
$data =& JRequest::getVar('text_0', '', 'post', 'string', JREQUEST_ALLOWRAW);
if (JFile::write($tmpfname, $data)) {
$MyUploads->attachment[] = $tmpfname;
}
?>
/Fredrik
This topic is locked and no more replies can be posted.