upgrade stopped my form from working

cleocadio 09 Jul, 2007
Today i did an upgrade on facileforms and saved all my data i had in the form:

The first tab is the foto attached:

next, the HTML Tab:

Preencha o seguinte formulário para obter informação especifica.
Verifique que os dados introduzidos estão correctos para ser contactado.
<br>
<br>
<table>
    <tr>
        <td>Nome:</td>
        <td><input name="name" type="text" size="41" class="inputbox"></td>
    </tr>
    <tr>
        <td>Morada:</td>
        <td><input name="address" type="text" size="41" class="inputbox"></td>
    </tr>
    <tr>
        <td>Código Postal:</td>
        <td><input name="postal_code" type="text" size="20" class="inputbox"></td>
    </tr>
    <tr>
        <td>Telefone:</td>
        <td><input name="phone" type="text" size="20" class="inputbox"> *</td>
    </tr>
    <tr>
        <td>Telemóvel:</td>
        <td><input name="mobile" type="text" size="20" class="inputbox"></td>
    </tr>
    <tr>
    <tr>
        <td>Email:</td>
        <td><input name="email" type="text" size="20" class="inputbox"> *</td>
    </tr>
        <td>Informações:</td>
        <td>
            <select name="info" class="inputbox">
                <option value ="comercial@virtual.pt">Desenvolvimento Web</option>
                <option value ="celia.leocadio@virtual.pt">Alojamento e Domínios</option>
                <option value ="comercial@virtual.pt">Segurança TI</option>
                <option value ="comercial@virtual.pt">Data Backups</option>
                <option value ="suporte@virtual.pt">Data Recovery</option>
                <option value ="comercial@virtual.pt">Gestão de Hardware</option>
                <option value ="comercial@virtual.pt">Gestão de Software</option>
                <option value ="comercial@virtual.pt">Vigilância</option>
                <option value ="comercial@virtual.pt">Servidores</option>
                <option value ="comercial@virtual.pt">Computadores</option>
                <option value ="comercial@virtual.pt">Comunicações</option>
                <option value ="comercial@virtual.pt">Redes</option>
                <option value ="comercial@virtual.pt">Retail Pro</option>
                <option value ="comercial@virtual.pt">Primavera</option>
                <option value ="comercial@virtual.pt">Winrest</option>
                <option value ="comercial@virtual.pt">Contratos de Assistência</option>
                <option value ="comercial@virtual.pt">Auditoria</option>
                <option value ="comercial@virtual.pt">Desenvolvimento</option>
                <option value ="suporte@virtual.pt">Suporte</option>
                <option value ="comercial@virtual.pt">Consultoria</option>
                <option value ="comercial@virtual.pt">Formação</option>
                <option value ="comercial@virtual.pt">Outsourcing</option>
                <option value ="suporte@virtual.pt">Centro de Reparações</option>
                <option value ="comercial@virtual.pt">Outros</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>Mensagem:</td>
        <td>
            <textarea name="message" rows="4" class="inputbox"></textarea>
        </td>
    </tr>
    <tr>
        <td></td>
        <td><input value="Enviar Formulário" type="submit" class="button"></td>
    </tr>
</table>
*) campo obrigatório
<br>
<br>



The javascript:

function validate_required(field,alerttxt) {
with (field) {
if (value==null||value=="") {
alert(alerttxt);
return false
}
else {
return true
}
}
}

function validate_form(thisform) {
with (thisform) {
if (validate_required(phone,"Preencha o telefone por favor.")==false || validate_required(email,"Preencha o email por favor.")==false){
return false
}
}
}



the PHP - the on submit before

<?php
$body = "Nome: " . $_REQUEST['name'] . "\n" . "Morada: " . $_REQUEST['address'] . "\n" . "Código Postal: " . $_REQUEST['postal_code'] ."\n" . "Telefone: " . $_REQUEST['phone'] . "\n" . "Telemóvel: " . $_REQUEST['mobile'] . "\n" . "Email: " . $_REQUEST['email'] . "\n" . "Mensagem:\n\n" . $_REQUEST['message'];
if($_REQUEST['email'] == "" || $_REQUEST['phone'] == "") {
echo "Erro:<br>Por favor preencha o email e o telefone.";
} else {
mail($_REQUEST['info'], 'Informação', $body, "From:SITE_VIRTUAL");
echo "Mensagem enviada com sucesso.";
}
?>



my template

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body, html{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
margin:auto;

}
.table_form {
padding:0px;
text-align:left;
border: 1px solid #CDCDCD;
}
.hh5{	font-size: 12px;color:#CC3333;
background-color: #eee;}

.tables{
	background-color: #f6f6f6;
	border-bottom: 1px solid #e4e4e4;
		border-top: 1px solid #eDeDeD;
	padding:5px;
	margin-top: 5px;
	margin-bottom: 5px;
	font-size: 10px;
	color: #3399cc;
	font-weight:bold;
	}
	
	.tables2{
	background-color: #FEFEFE;;
	border-bottom: 1px solid #e4e4e4;
		border-top: 1px solid #eDeDeD;
	padding:3px;
	margin-top: 5px;
	margin-bottom: 5px;
	font-size: 10px;
	color: #888;
	}

-->
</style>
</head>

<body>
<p> </p>

<table width="60%" border="0" align="center" cellpadding="5" class="table_form">
    <tr>
        <td width="33%" class="tables">Nome: </td>
        <td width="67%" class="tables2">{name}</td>
    </tr>
    <tr>
        <td class="tables"> Morada: </td>
        <td class="tables2"> {address} </td>
    </tr>
    <tr>
        <td class="tables"> Código Postal: </td>
        <td class="tables2"> {postal_code} </td>
    </tr>
    <tr>
        <td class="tables"> Telefone: </td>
        <td class="tables2"> {phone} </td>
    </tr>
    <tr>
        <td class="tables"> Telemóvel: </td>
        <td class="tables2"> {mobile} </td>
    </tr><tr>
        <td class="tables"> Email: </td>
        <td class="tables2"> {email} </td>
    </tr>
        <td class="tables"> Informações: </td>
        <td class="tables2"> 
		{info} </td>
    </tr>
    <tr>
        <td class="tables"> Mensagem: </td>
        <td class="tables2"> 
		{message} </td>
    </tr>
</table>


</body>
</html>


Can u please tell me what is wrong? I get no mail, but also no error.

Post edited by: cleocadio, at: 2007/07/09 19:59

Post edited by: cleocadio, at: 2007/07/09 20:01<br><br>Post edited by: cleocadio, at: 2007/07/09 20:02
GreyHead 10 Jul, 2007
Hi Cleocadio,

You wrote: Today i did an upgrade on facileforms

You do know that this is the ChronoForms forum, not facileforms??

This looks like ChronoForms data so I'm guessing that it's a typo but thought I'd check.

I'll reconstruct your form and see what happens for me.

Bob
Max_admin 10 Jul, 2007
cleocadio,

I cant see any images attached!!

Where do you use your javascripts in the code ? again I cant see how do you use them, you have a submit button so I guess you have them in the "form tag attachement" ? thats the only other way I think, you should have something like onSubmit="validate_form(ChronoContact_myform)"

Lastly, you should NOT use the "mail" function in the PHP before submit, this may be a problem, you can use the mosMail, please search the forums here to see another post with discriptions for all its parameters and arguments.

So mainly you should clear all what you have of PHP code in the on submit field then when you get the email you start debugging your code

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cleocadio 10 Jul, 2007
Oh i'm sorry about the facileforms, that was the sistem i had before.

I had a form in facileforms wich a programmer re-write for chronoforms, version com_chronoforms_V1[1].0.2.1.zip.

Yesterdeay i needed to include a new form with file upload sistem, so i upgraded to the last one.

I copied every tab content to notepad and put everything the same.

The thing is, it does not give an error, but it doesn't send anything.

upgrade stopped my form from working image 1 http://img.photobucket.com/albums/v31/cleocadio/form.png[/img]

The other form i created works just fine:

the form:

http://www.virtual.pt/index.php?option=com_chronocontact&chronoformname=contacto
cleocadio 10 Jul, 2007
By the way, since two weeks ago the functions php and sendmail, vailable ant config from joomla are not working, so we are using smtp, with the ip as an smtp adress.

Is this the problem? i no nothing of php or javascript.

edtit**
the php mail function and sendmail was restored, and it still does not work<br><br>Post edited by: cleocadio, at: 2007/07/10 18:52
Max_admin 11 Jul, 2007
Hi,

When I look at the screenshot, simply you have many fields missing, could you please watch the tutorial from the tutorials page ? it will solve all your troubles!!

Sincerely,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cleocadio 11 Jul, 2007
Hi Max.

I've seen the tutorials and have about dozens of forms which i did myself, simple, and work. This, as i said i did not do.

So, to make sure the problem is the upgrade i did the following: Reinstalled the previous version on another site (chronoforms_V1[1].0.2.1.zip)

Copied the content i paste above on the the tabs as shown in pic: http://img.photobucket.com/albums/v31/cleocadio/for3.jpg

Did not touch the general config, it has those dummy adress and subject.

Result: the form works, it sends to different e-mails according to the select box options.

The actual version as a lot more tabs and fields, and maybe i don't know where each thing goes, like 2 php boxes. I don't understant php.:S

So please help, where do things fit in the new version?
[file name=chrono_virtual.txt size=6225]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chrono_virtual.txt[/file]
GreyHead 11 Jul, 2007
Hi Cleocadio,

I cut and pasted from your text file into a new form using the latest version of ChronoForms. As it is it will not send an e-mail - I had to change a few things.

[list]
  • 'Email the results' must be set to 'Yes'
  • The three last General fields; 'From email', 'From name' and 'ReplyTo email' must have values.
  • The 'Email Address' and/or the 'Email field' must have a value (who is the e-mail to go to)
  • Ideally the 'Email Subject' or the 'Subject field' needs a value (if not the email is sent without a subject).
  • [/list]With these changes an email is generated OK. Se the picture below using your template.

    Bob
    upgrade stopped my form from working image 2
    GreyHead 11 Jul, 2007
    Please ignore - the forum software glitched with the image. Bob<br><br>Post edited by: GreyHead, at: 2007/07/11 19:00
    GreyHead 11 Jul, 2007
    . . . and here are the 'General' tab settings I used.

    upgrade stopped my form from working image 3<br><br>Post edited by: GreyHead, at: 2007/07/11 19:02
    GreyHead 11 Jul, 2007
    Oh and I forgot the JavaScript. As Max wrote, you need to have 'onsubmit="return validate_form(ChronoContact_test1)"' in the Onsubmit box.

    Bob
    This topic is locked and no more replies can be posted.

    VPS & Email Hosting 20% discount
    hostinger