Forums

Article title field in e-mail

ZICO 10 Mar, 2015
Hi,

First of all, I have to say I'm only a beginner both in Joomla and Chronoforms and I have no coding knowledge so I might find some things difficult to understand.
I used an older version of Chronoforms but it doesn't seem to be working any more so I installed the new version.
I wasn't sure how to make all the needed fields in the form so I basically copied a demo form, but there's a very important field missing and I don't know how to add it!
When submitting the form in the e-mail I'm getting as an admin of the site, I need to have a field in the e-mail and/or subject that would include the article title from which the form was submitted from.
I have a travel agency and I have a form on each of my tours and when a person sends an inquiry, I want to see what article it refers to. In the previous version I had to insert some code and it worked fine, but now that either isn't working or I'm inserting it in the wrong place.
I would appreciate some step-by-step help on how to make this work! Thank you very much!
ZICO 10 Mar, 2015
Thanx! I've already tried inserting that code to a custom field but it didn't work, there might be a catch at the On submit event I'm missing, I'll try to figure it out somehow!
fasenderos 11 Mar, 2015
Sure.. Have you catch the hidden field in the e-mail body? {hidden-name}
fasenderos 11 Mar, 2015
To be more specific, add a Custom Element with this code

<?php
$input = JFactory::getApplication()->input;
$id = $input->getInt('id'); //get the article ID
$article = JTable::getInstance('content');
$article->load($id);
?>
<input type='hidden' name='article_title' id='article_title' value='<?php echo $article->get('title'); ?>' />


Than in the email body put this code:

<p>The article title is: {article_title}</p>
This topic is locked and no more replies can be posted.