Buy Now
Sign in

the "email field"

cleocadio , September 17 2007, 19:19
C
cleocadio 23
September 17 2007, 19:19 #2256
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???
admin 28
September 17 2007, 21:44 #2263
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
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 17 2007, 22:50 #2271
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 <br><br>Post edited by: cleocadio, at: 2007/09/17 18:52
admin 28
September 18 2007, 02:30 #2278
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
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 18 2007, 15:04 #2292
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:
admin 28
September 18 2007, 18:54 #2298
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
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 18 2007, 19:12 #2302
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..
admin 28
September 18 2007, 19:26 #2303
thank you!! please send me this file: components/com_chronocontact/chronocontact.php, I will look at it and let you know

cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 18 2007, 20:06 #2305
I think this is what you asked<br><br>Post edited by: cleocadio, at: 2007/09/18 16:07
C
cleocadio 23
September 18 2007, 20:09 #2306
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]
admin 28
September 19 2007, 00:05 #2311
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
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 20 2007, 21:28 #2361
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.
C
cleocadio 23
September 20 2007, 22:39 #2363
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
admin 28
September 21 2007, 01:02 #2375
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
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
C
cleocadio 23
September 21 2007, 15:19 #2388
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
    admin 28
    September 22 2007, 07:14 #2406
    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
    If your main question got answered then please mark the answer using the button!
    Did you try the new ChronoForms7 ? if yes then please send us your comments!!
    C
    cleocadio 23
    September 24 2007, 14:50 #2426
    :(

    changed the code, put a comma and another field. Sends nothing.
    C
    cleocadio 23
    September 24 2007, 15:02 #2427
    oh, had to remove your code. It sends nothing, even with just one filed. it wont work at all.
    admin 28
    September 24 2007, 19:49 #2433
    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
    If your main question got answered then please mark the answer using the button!
    Did you try the new ChronoForms7 ? if yes then please send us your comments!!