Forums

On Submit code - no send email

marcportero 17 Dec, 2009
Good morning,
I updated chronoforms (an excellent complement) to version V3.1_RC5.5 and have me work, but had a code "On Submit code - after sending email:" that send an email to the joomla registered user, filling the form.
The code is:
value="<?= $user->name; ?>" /> 
<input type="hidden" name="email" id="email"
value="<?= $user->email; ?> " 
<?php
$subject = "Intranet: Regidoria de Governació.";
$html_message = "ENVIAMENT CORRECTE
En/Na ".$_POST['username'].", ha realitzat una petició a la Regidoria de Governació.
Sol·licitant: ".$_POST['select_1']."
Data Inici: ".$_POST['date_0']."
Data Fi: ".$_POST['date_1']."
Regidoria que ho sol·licita: ".$_POST['select_2']."
Petició: ".$_POST['text_4']."
Prioritat: ".$_POST['select_10']."
Persona que Autoritza: ".$_POST['text_7']."
Observació: ".$_POST['text_5']."
PENDENT DE CONFIRMACIÓ";
JUtility::sendMail('****@******.***', 'Intranet ', $from, $subject, $html_message, 0);


****** is the email.

Thank you very much
GreyHead 17 Dec, 2009
Hi marcportero,

The current release of ChronoForms supports multiple Email Setups, create a seond one using a Dynamic To element to do this.

Bob
marcportero 17 Dec, 2009
Thank you very much, for so quick reply.
The problem I have is that email should be different, the other sending is this:
<div class="form_item">
<div class="form_element cf_heading">
<p class="cf_text">En/Na <strong>{username}</strong>, ha realitzat una petició al <strong>"Departament Informàtica".</strong><br />{email}</p>
<h1 class="cf_text">Comanda Informàtica</h1>
</div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown"><label class="cf_label">Sol·licitant:</label><span> {select_1}<br /></span></div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown"><label class="cf_label">Impressora:</label><span> {select_3}<br /></span></div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown"><label class="cf_label">Material de Gravació</label><span>: {select_5}<br /></span></div>
</div>
<div class="form_item">
<div class="form_element cf_textbox"><label class="cf_label">Altres:</label><span> {text_10}<br /></span></div>
</div>
<div class="form_item">
<div class="form_element cf_textarea"><label class="cf_label">Observacions:</label><span> {text_12}<br /><br /></span> 
<hr />
* apartat exclusiu per el <strong>Cap del Departament Informàtic.</strong> 
<table style="text-align: center; background-color: #f0f8ff; width: 400px;" border="0">
<tbody>
<tr>
</tr>
<tr>
<td colspan="2">
<div class="Estilo3">Resposta<br /></div>
</td>
</tr>
<tr>
<td colspan="2"><br /></td>
</tr>
<tr>
<td width="200" bgcolor="#00ff00"><a href="mailto:{email}?subject=Intranet, Resposta: Comanda Informàtica&body=<b>ACCEPTADA.</b> <br> La sol·licitud, ha sigut revisada.<br> Sol·licitant: <b>{select_1}.</b> <br> Impressora: <b>{select_3}.</b> <br> Material de Gravació: <b>{select_5}.</b><br> Altres: <b>{text_10}.</b><br>  Observacions: {text_12}.">ACCEPTADA</a></td>
<td width="200" bgcolor="#ff0000"><a href="mailto:{email}?subject=Intranet, Resposta: Comanda Informàtica&body=<b>DENEGADA.</b> <br> La sol·licitud, ha sigut revisada.<br> Sol·licitant: <b>{select_1}.</b> <br> Impressora: <b>{select_3}.</b> <br> Material de Gravació: <b>{select_5}.</b><br> Altres: <b>{text_10}.</b><br>  Observacions: {text_12}.">DENEGADA</a></td>
</tr>
</tbody>
</table>
</div>
</div>

Thank you very much.
A greeting
GreyHead 17 Dec, 2009
Hi marcoporto,

If you create a second Email Setup then a second Email Template will also be created to go with it.

Bob
marcportero 17 Dec, 2009
Thanks again.
I'll try to test this holiday season.
A greeting
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount

{item:title} {images:#}