Hi,
I was using the $email variable replace some text in all the emails templates in the "On Submit code - before sending email:" like this:
but now with the ChronoForms_V3.1_RC5 the $email variable seems to be NULL or empty,
this variable has change?
is there any other way to do this?
many thanks in advance
blue
I was using the $email variable replace some text in all the emails templates in the "On Submit code - before sending email:" like this:
for($i=0;$i<count($emails);$i++){
$emails[$i]->template = str_replace('{_tipo}', $tvalues['tipo'], $emails[$i]->template);
$emails[$i]->template = str_replace('{_grupo}', $tvalues['grupo'], $emails[$i]->template);
$emails[$i]->template = str_replace('{_valor_sem_iva}', number_format($tvalues['valor_sem_iva'], 2, ',', ' '), $emails[$i]->template);
$emails[$i]->template = str_replace('{_taxa_adene_sem_iva}', number_format($tvalues['taxa_adene_sem_iva'], 2, ',', ' '), $emails[$i]->template);
$emails[$i]->template = str_replace('{_valor_final_com_iva}', number_format($tvalues['valor_final_com_iva'], 2, ',', ' '), $emails[$i]->template);
$emails[$i]->template = str_replace('{_tipo_de_imovel}', $tmvalue, $emails[$i]->template);
$emails[$i]->template = str_replace('{_resposta}', $rvalue, $emails[$i]->template);
}
but now with the ChronoForms_V3.1_RC5 the $email variable seems to be NULL or empty,
this variable has change?
is there any other way to do this?
many thanks in advance
blue
yes, it was changed, now you need to do this:
then use $MyFormEmails->template
also $MyFormEmails->emails is the emails array!
Regards
Max
$MyForm = $this->getInstance('form name here');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
then use $MyFormEmails->template
also $MyFormEmails->emails is the emails array!
Regards
Max
This topic is locked and no more replies can be posted.