the "email field"

cl cleocadio 17 Sep, 2007
Heello, one simple question.

What should i put in the e-mail field so that the sender gets a copy when he submits, in the e-mails he puts in the form :

as in template:

{email},{mail_ti}

or simple:

email,mail_ti

how???
Max_admin Max_admin 17 Sep, 2007
Hi,

For the sender to get a copy, please put the "field name" where the sender puts his email, at the "Special fields" tab -> "Email field name"

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 17 Sep, 2007
The thing is, it was working, with the setting that are in the picture, but i noticed, that since implementing the javascript validation, it stoped working.

 <tr class="respostas">
        <td><input name="email" type="text" id="email" size="30" class="inputbox" /></td>
        <td><input name="departamento" type="text" id="departamento" size="30" class="inputbox" /></td>
      </tr>
      <tr class="elementos">
        <td>E-mail do Responsável das TI da Empresa </td>
        <td> </td>
      </tr>
      <tr class="respostas">
        <td><input name="mail_ti" type="text" id="mail_ti" size="30" /></td>
        <td> </td>
      </tr>


Does it interfere

Post edited by: cleocadio, at: 2007/09/17 18:50 the "email field" image 1<br><br>Post edited by: cleocadio, at: 2007/09/17 18:52
Max_admin Max_admin 18 Sep, 2007
Hi cleocadio,

I guess you would mean it stopped working since you made the upgrade to be able to use the validation, I see in the pic that this is an old version and the validation is in V2.3 RC1 only, is this right ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 18 Sep, 2007
Hi admin, let me resume the story:

I think i have version 2.2.1, i can't tell, cause the directory is not available to me.

I hve about 3 forms configured.

This last form i made was working ok, sending copies to 2 e-mail fields that existed, etc.
Then my boss wanted some fields to be mandatory, so i put a javascript valiation for some fields:

 function checkForm(form)
{
valid = true;

 if(form.nome.value == ""«») 
 {
   alert("Por favor, introduza o seu nome!"«»);
return false;
  }
 if(form.empresa.value == ""«») 
 {
   alert("Por favor, introduza a empresa!"«»);
return false;
  }
   if(form.telefone.value == ""«») 
 {
   alert("Por favor, introduza o telefone!"«»);
return false;
  }
 if(form.email.value == ""«») 
 {
   alert("Por favor, introduza o seu e-mail!"«»);
return false;
  }
   if(form.mail_ti.value == ""«») 
 {
   alert("Por favor, introduza o email do responsável de TI!"«»);
return false;
  }
   
 if(form.servico.selectedIndex == 0) 
 {
   alert("Por favor, escolha um serviço"«»);
return false;
  }
   if(form.problema.selectedIndex == 0) 
 {
   alert("Por favor, escolha um Problema"«»);
return false;
  }
   if(form.descricao.value == ""«») 
 {
   alert("Por favor, descreva o Problema!"«»);
return false;
  }
return valid;
}


Now, the validation works, as you can see:

http://www.virtual.pt/index.php?option=com_chronocontact&chronoformname=suporte

but the sending of the copies to those 2 fields, email and mail_ti stoped working.

Do i have to upgrade?

Other ting is, since i installed this version, a couple of months ago, e don't have acess trough ftp to the chronoforms folder. :huh:
Max_admin Max_admin 18 Sep, 2007
Hi,

I cant understand why would a javascript change may affect the PHP thing which is the "email", lets try this please :

Do you have your old JS code ? try to replace the new one, does it work ?

Please try to add only 1 field name there, like "email" only, does it send to this field value ?

Please let me know!

Thanks!!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 18 Sep, 2007
the test you asked:

it sends copy if i put just one field, "email" or "mail_ti"

If i put two, comma separated or not, it does not send..
Max_admin Max_admin 18 Sep, 2007
thank you!! please send me this file: components/com_chronocontact/chronocontact.php, I will look at it and let you know😉

cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 18 Sep, 2007
I think this is what you asked<br><br>Post edited by: cleocadio, at: 2007/09/18 16:07
cl cleocadio 18 Sep, 2007
it's txt so i can upload [file name=chronocontact-8a9fce958814d621b063754b39eee9c9.txt size=12343]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-8a9fce958814d621b063754b39eee9c9.txt[/file]
Max_admin Max_admin 19 Sep, 2007
Hi cleocadio,

Lets do this fix, please find the 2 instances of this line of code :

$recipient = $_POST[$paramsvalues->emailfield];


replace them with :

$recipient = explode(",",$_POST[$paramsvalues->emailfield]);


That should fix it, please let me know😉

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 20 Sep, 2007
things are getting complicated. Somehow, when i install the component i cannot reach it via ftp.

So i uninstalled the version i had, copyed the definitions i had on the 3 forms and installed the most recent release, yesterday.

I created the 3 forms again, i noticed there are more fieds, but only put the one i had.

It all goes well, the forms apeear, i click submit, it shows the page o told to show after, but no mail arrives.

It makes the javascript validation i put in the box, i don't use the new sistem.

:huh: I'm like this. For one simple extra field as cc in the previous versions, i know don't have none of them working.
cl cleocadio 20 Sep, 2007
I read the forum and put the latest release, 2.3.4.

It sends mails, but only if "only one" special field,

Email field:

.

if i put another field in:

Subject field:
CC field:
BCC field:
From email field:
From name field:


or in two fields in Email field: separated by a coma. Then it sends nothing
Max_admin Max_admin 21 Sep, 2007
Hi cleocadio,

Even the new version doesn't have the hack I gave to you, lets do this :

#1- try to do the hack using the Joomlaexplorer component, it may get over the permissions issues you have.

OR

#1- backup your forms through the admin interface
#2- uninstall the version you have
#3- hack the new version before you install it then rezip the package
#4- install it

Please let me know when it works!

Best regards,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 21 Sep, 2007
i Followed your instructions :

I found the code you asked around line 455

    if ( trim($paramsvalues->emailfield) != "" ) {
	        $recipient[]   = $_POST[$paramsvalues->emailfield];
	    }


Then, put your hack:

 
 if ( trim($paramsvalues->emailfield) != "" ) {
$recipient = explode(",",$_POST[$paramsvalues->emailfield]);
}


but since i noticed the code had $recipient[] and your hack just $recipient, i tried both ways.

then, on special fields i put the two filed:

Email field: mail_ti,email

I did not touched anything else.

result, it doesn´t send nothing. if i put just one field it sends.<br><br>Post edited by: cleocadio, at: 2007/09/21 11:42
Max_admin Max_admin 22 Sep, 2007
Hi Cleocadio,

lets fix my hack to be this :


if ( trim($paramsvalues->emailfield) != "" ) {
$recipients_temp = explode(",",$_POST[$paramsvalues->emailfield]);
$recipient = array();
foreach($recipients_temp as $recipient_temp){
$recipient[] = $_POST[$recipient_temp];
}
}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cl cleocadio 24 Sep, 2007
:(

changed the code, put a comma and another field. Sends nothing.
cl cleocadio 24 Sep, 2007
oh, had to remove your code. It sends nothing, even with just one filed. it wont work at all.
Max_admin Max_admin 24 Sep, 2007
Thats cool, its seems you made a small mistake while adding the hack;)lets do that this time :

This code is there twice

if(trim($paramsvalues->emailfield) != ""«»){
					$recipient = $_POST[$paramsvalues->emailfield];
					mosMail($from, $fromname, $recipient, $subject, $body, true, NULL, NULL, $attachements, NULL, NULL ); 
				}


we will replace it with this code :


if(trim($paramsvalues->emailfield) != ""«»){
$recipients_temp = explode(",",$_POST[$paramsvalues->emailfield]);
foreach($recipients_temp as $recipient_temp){
					mosMail($from, $fromname, $_POST[$recipient_temp], $subject, $body, true, NULL, NULL, $attachements, NULL, NULL ); 
}
				}
<br><br>Post edited by: admin, at: 2007/09/24 15:50
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.