Hi,
I've created my form with following fields:
$text_4
$text_2
$date_3
$select_9
$select_5
I'm able to save data to a jos_content table and section and category id are predefined.
When I try the form, the data are stored in my section, i can read the title but when I open the article there isn't the content.
At Onsubmit code i put this:
Can anyone help me?
Thanks a lot
I've created my form with following fields:
$text_4
$text_2
$date_3
$select_9
$select_5
I'm able to save data to a jos_content table and section and category id are predefined.
When I try the form, the data are stored in my section, i can read the title but when I open the article there isn't the content.
At Onsubmit code i put this:
<?php
$text_4 = JRequest::getString('text_4', '', 'post');
$text_2 = JRequest::getString('text_2', '', 'post');
$date_3 = JRequest::getString('date_3', '', 'post');
$select_9 = JRequest::getString('select_9', '', 'post');
$select_5 = JRequest::getString('select_5', '', 'post');
$title = $text_4.$text_2.$date_3;
JRequest::setVar('title', $title);
JRequest::setVar('sectionid', 2);
JRequest::setVar('catid', 4);
JRequest::setVar('state', 1);
?>
Can anyone help me?
Thanks a lot
Hi BBPlayer,
The jos_content table has predefined columns for the article content and you need to save to these columns.
The submitcontent form from the donwnload area here is designed to let you do that.
Bob
**Warning** don't add extra columns to core Joomla tables unless you know exactly what you are doing, and even then best not to.
The jos_content table has predefined columns for the article content and you need to save to these columns.
The submitcontent form from the donwnload area here is designed to let you do that.
Bob
**Warning** don't add extra columns to core Joomla tables unless you know exactly what you are doing, and even then best not to.
So if I want to add a select field and read the selected option in a content, I can't?
Thanks
Thanks
Hi BBPlayer,
Yes you can but you have to put it into one of the standard content 'fields' first. You can do this in the OnSubmit Before code box.
There are one or two other threads discussing this with some examples if you search on submit_content
Bob
Yes you can but you have to put it into one of the standard content 'fields' first. You can do this in the OnSubmit Before code box.
There are one or two other threads discussing this with some examples if you search on submit_content
Bob
This topic is locked and no more replies can be posted.