Forums

Help adding table to joomla article with chronoforms

yaksushi 04 Feb, 2011
I'm trying to create a form that submits this table into a joomla article. For some reason when I try to include any table no matter how basic it does not work. Thanks for any help you guys can offer.


I've narrowed it down to this...

If I use
<table border="."0".">
in replace of
<table border="0">

my table will show up in my article,

but if I try to use
<table class="news_item_f" style="background-color: #f5f2e1; border: 2pt solid #4D270C;" border="1" cellpadding="5" cellspacing="5" frame="border">


it does not work.... I tried replacing all " with "." but that doesn't work.... Anyone have any ideas?
GreyHead 04 Feb, 2011
Hi yaksushi ,

Exactly what doesn't work?

Bob
yaksushi 04 Feb, 2011
IF I try to style my table with this

<table class="news_item_f" style="background-color: #f5f2e1; border: 2pt solid #4D270C;" border="1" cellpadding="5" cellspacing="5" frame="border">


It works with a plain old table


If I make it look like this

<table border="."0".">


instead of the default

<table border="0">


It's stripping some of the table code it has something to do with the "
GreyHead 05 Feb, 2011
Hi yaksushi,

Thanks, and where are you putting this code?

Bob
yaksushi 05 Feb, 2011
On Submit code - before sending email:

I have noticed that certain html is not getting translated into the article it looks like it related to either spaces or "
GreyHead 05 Feb, 2011
Hi yakshuki,

I'm not quite sure what you are doing but this code will take an input from the submitcontent form and wrap it in a table. Use in the OnSubmit before Email box:
<?php
$fulltext = JRequest::getVar('fulltext', '', 'post');
$fulltext = '<table class="news_item_f" style="background-color: #f5f2e1; border: 2pt solid #4D270C;" border="1" cellpadding="5" cellspacing="5" frame="border"><tr><td>'.$fulltext.'</td></tr></table>';
$db =& JFactory::getDBO();
$fulltext = $db->getEscaped($fulltext);
JRequest::setVar('fulltext', $fulltext);
?>
The table appears to end up in the article OK.

Bob
yaksushi 05 Feb, 2011
Thanks bob I'll take a look at it.
This topic is locked and no more replies can be posted.