Forums

Auto load Article Title

need help
trying to get the page title when somone complete the form.
using chronoform 4.0.1
using a module inside article {chronoforms}eform name{/chronoforms}
i try crate a Custom Element name title and input this code:
<?php
$doc =& JFactory::getDocument();
?>
<input type='hidden' name='title' id='title' value='<?php echo $doc->getTitle(); ?>' />

when i recive an email i get the Page Category in the title field instead of title
thanks Patrick
i try that and it didnt work.
im new to chronofors
can you tell me where to put the code.
i only created a Custom Element with field ID rticle_title and put this code
<?php
$form->data['article_title'] = '';
if ( isset($form->data['option']) && $form->data['option'] == 'com_content' && isset($form->data['id']) ) {
  $article =& JTable::getInstance('content');
  $article->load($form->data['id']);
  $form->data['article_title'] = $article->get('title');
}
?>


what am i doing wrong?
This topic is locked and no more replies can be posted.