Hi,
I may have not searched the forum with the right keywords, but here is my need:
- Since I do not want clients to mess up with the settings of chronoforms, I would need to pull automatic articles content to fill the email.
As an example, users register to view specific PDFs in the website but the links are not directly accessible (in order to get leads). They receive the link directly after registering through CF4 at teh valid email address given.
I would need the custom email message with direct links to be updated easily by client outside the CF interface (hidden to non-superadmin, J2.5).
Any easy way?
Thanks for your help.
I may have not searched the forum with the right keywords, but here is my need:
- Since I do not want clients to mess up with the settings of chronoforms, I would need to pull automatic articles content to fill the email.
As an example, users register to view specific PDFs in the website but the links are not directly accessible (in order to get leads). They receive the link directly after registering through CF4 at teh valid email address given.
I would need the custom email message with direct links to be updated easily by client outside the CF interface (hidden to non-superadmin, J2.5).
Any easy way?
Thanks for your help.
Hi faraon,
I haven't tried this with CFv4 but it worked for a client in CFv3.
Create the HTML body for the email in an external file (or in an article if you prefer). Then use PHP to include it into the Email template by adding this code into the template:
Or to include an article:
Bob
I haven't tried this with CFv4 but it worked for a client in CFv3.
Create the HTML body for the email in an external file (or in an article if you prefer). Then use PHP to include it into the Email template by adding this code into the template:
<?php
include('path_to_file.html');
?> Or to include an article:
<?php
$db =& JFactory::getDBO();
$query = "
SELECT CONCAT(`introtext`, `fulltext`)
FROM `#__content`
WHERE `id` = '999' ;
";
$db->setQuery($query);
echo $db->loadResult();
?>Not tested and may well need debugging!Bob
Thanks, looks like the right direction logic, but I probably missed a step here, how can you add php code in your editor that only supports html and comments out automatically invalid html?
Here is what happens (at the bottom):
Here is what happens (at the bottom):
<p>{gender} {first_name} {last_name}<br />{company} ({country})<br />{email} <br />T. {phone}</p>
<p>Current website: {website}</p>
<p>Your request / project details:<br />{message}</p>
<p>Project Type: {project_type}</p>
<p>Timeframe: {timeframe}</p>
<p>ATTACHED FILE: {project_file}</p>
<!--?php
include('index.php?option=com_content&Itemid=53&catid=50&id=6677&lang=en&view=article');
?-->
Hi faraon,
Turn off the Rich Text editor to use PHP in the Email template.
Or you could use a Custom Code action to add the included content to $form->data['inserted_code'] and then add that to the template as {inserted_code}
Bob
Turn off the Rich Text editor to use PHP in the Email template.
Or you could use a Custom Code action to add the included content to $form->data['inserted_code'] and then add that to the template as {inserted_code}
Bob
Where can I change the editor?
Not in the Joomla default config, I tried, looks like yours is another one.
Not in the Joomla default config, I tried, looks like yours is another one.
Hi faraon,
It's off by default but you can change it with the link shown in the image.
Bob
It's off by default but you can change it with the link shown in the image.
Bob
Yep, looks great and easy to find, except that it is unfortunately not what I see here...
[attachment=0]ScreenShot1146.jpg[/attachment]
[attachment=0]ScreenShot1146.jpg[/attachment]
Hi faraon,
Please go to the form General tab (click the form name link to get there) and change the Form Wizard Mode to Advanced.
Bob
PS Don't change back again from Advanced to Easy or you may lose some settings.
Please go to the form General tab (click the form name link to get there) and change the Form Wizard Mode to Advanced.
Bob
PS Don't change back again from Advanced to Easy or you may lose some settings.
Ok, managed, but now the after-submit page displays weird code.
Email received but without the additional content.
Email received but without the additional content.
Why is there a debugger when the only thing i did was to include the php line above? I did not activate it...
Hi faraon,
Pass, I can't tell from here. Is there a Debugger action in your form On Submit event?
Bob
Pass, I can't tell from here. Is there a Debugger action in your form On Submit event?
Bob
I just did what you said, switch to advanced, then pasted the p line, that is all.
This topic is locked and no more replies can be posted.
