Forums

how to show field names and answers in content (SOLVED)

winterthorn 18 Feb, 2010
First off I would like to say amazing product I will most definably be purchasing this for my clients.

Now here is the problem:

I have created my form I have created loaded and modified the submitcontent.cfbak. file and I can get everything to submit to the article which is exactly as it should be but none of the field names show up all I get on my content page is the answers… so it makes the information a bit confusing is there some way to format it so that the resulting content page shows both the questions and the answers? That would make my entire week thanks you so much

i am useing the latest versions of the software as i just down loaded every thing 2 days ago
Tuesday 2/12/2010

<p><span style="color: #0000ff;"><strong>Thank you for submitting your story, we will review it shortly and if approved it will be published!</strong></span></p>
<p><strong>Cheers</strong></p>
<p><span style="text-decoration: underline;"><strong>ChronoEngine.com team!</strong></span></p>
<?php
$_POST['catid'] = '5';
$_POST['id'] = '';
$_POST['sectionid'] = '2';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");

$_POST['attribs'] = 'show_title= 1; 
link_titles=1;
show_intro=1;
show_section=1;
link_section=1;
show_category=1 ;
link_category=1; 
show_vote=1;
show_author=1 ;
show_create_date=1 ;
show_modify_date=1 ;
show_pdf_icon=1 ;
show_print_icon=1 ;
show_email_icon=1;
language=0 ;
keyref=0;
readmore= ';


?>
<?php
$user =& JFactory::getUser();
$_POST['created_by_alias'] = $user->username;
?>
<?php
$_POST['fulltext'] = 

$_POST['text_10'].'<br><br>'.$_POST['select_10'].'<br><br>'.$_POST['select_12'].'<br><br>'.$_POST['select_5'].'<br><br>'.$_POST['select_7'].'<br><br>'.$_POST['text_11'].'<br><br>'.$_POST['text_98'].'<br><br>'.$_POST['text_2'].'<br><br>'.$_POST['text_4'].'<br><br>'.$_POST['text_3'].'<br><br>'.$_POST['text_99'].'<br><br>'.$_POST['text_13'].'<br><br>'.$_POST['text_15'].'<br><br>'.$_POST['text_21'].'<br><br>'.$_POST['text_26'].'<br><br>'.$_POST['text_27'];
?>


GreyHead 19 Feb, 2010
Hi winterthorn,

You just need to add the questions - or any other text - in here
$_POST['fulltext'] = 'The number of angels on the head of a pin is: '.$_POST['text_10'].'<br><br>The longest word in the English language is: '.$_POST['select_10'].'<br><br>'xxx: .$_POST['select_12']. . . .


Bob
winterthorn 19 Feb, 2010
you sir are my personal hero thank you so very much
mrjohnson 24 Mar, 2010
Quick question, Where exactlty do you place this line of code? I tried it in the on submit section but i keep getting error messages.
GreyHead 24 Mar, 2010
Hi mrjohnson,

You're in the correct location but you probably need to wrap it in <?php . . . ?> tags

Bob
mrjohnson 25 Mar, 2010
okay i'm placing it in the on submit box but it still isnt coming out right here is the code that i'm working with...
<p><span style="color: #0000ff;"><strong>Thank you for submitting your story, we will review it shortly and if approved it will be published!</strong></span></p>
<p><strong>Cheers</strong></p>
<p><span style="text-decoration: underline;"><strong>ChronoEngine.com team!</strong></span></p>
<?php
$_POST['catid'] = '35';
$_POST['id'] = '';
$_POST['sectionid'] = '5';
$_POST['state'] = '0';
$_POST['created'] = date("Y-m-d H:i:s");
?>

<?php
$_POST['fulltext'] = 'The name: ';
$_POST['select_3'].'went by was:';
$_POST['text_4'].;
The date we met was'.
$_POST['date_7'].;
?>
GreyHead 26 Mar, 2010
Hi mrjohnson,

Thiscode is five separate lines
$_POST['fulltext'] = 'The name: ';
$_POST['select_3'].'went by was:';
$_POST['text_4'].;
The date we met was'.
$_POST['date_7'].;
most of them bad PHP. The original code was one line
$_POST['fulltext'] = 'The name: '.$_POST['select_3'].'went by was:'.$_POST['text_4'].'
  The date we met was'.$_POST['date_7'];

Bob
This topic is locked and no more replies can be posted.