Form Contact Form7- No error message but the form is not submitted

Asked

Viewed 572 times

1

Hello, I have a form using the wordpress plugin contact-form-7 with javascript code. I use Hidden type fields and conditional fields. Filling the fields works perfectly, however when I give a Ubmit no message appears and no error and the form is not sent. At first I thought that the configuration of the mail would be incorrect but I think that even then a message would appear. I really don’t know what’s wrong. This is my code.

<script type="text/javascript">
valor1="";
valor2="";
participantes="";
function calculo1(){
var4= Number(document.getElementById("participantes1").value);
if (var4==0) {
   var4=1;
}  
if (document.getElementById("tipo1").checked) {
   var1 = "150"; 
   Var2 = "1ª vez normal";
}
if (document.getElementById("tipo2").checked) {
   var1 = "130";
   Var2 = "1ª vez antecipada";
} 
if (document.getElementById("tipo3").checked) {
   var1 = "130"; 
   Var2 = "2ª vez normal";
}
if (document.getElementById("tipo4").checked) {
   var1 = "110";
   Var2 = "2ª vez antecipada";
 }             
 document.getElementById("valor1").value  =Math.round(Number(var1)*var4*100)/100;
 document.getElementById("tipo_insc1").value = var2;
}
</script>
<script type="text/javascript"> 
 function calculoiva1(){
 var3= Number(document.getElementById("valor1").value);
 calcular = var3*1.23;
 document.getElementById('valor2').value = Math.round(calcular * 100) / 100;
 }
</script>
<script type="text/javascript"> 
function data1(){
 hoje = new Date();
 mes=hoje.getMonth();
 mes1=Number(mes) + 1;
 document.getElementById('datainsc').value = hoje.getDate()+'/'+ mes1+'/'+ hoje.getFullYear();
 }
</script>
[hidden Curso1 id:curso1 "Equipamentos de Fitness ao ar livre - a nova norma Europeia"]
[hidden Local1 id:local1 default:"Lisboa"]
[hidden Dataini1 id:dataini1 "18/05/2017"]
[hidden Datafim1 id:datafim1 "18/05/2017"]
<h5><strong>Dados do participante</strong></h5>
<label><strong>Nome [text* your-name id:nome1]</strong></label>
<div class="clearfixform">
<div id="left">
         <label><strong>Cargo[text cargo id:cargo1]</strong></label><br/>
         <label><strong>Telefone fixo [text telefone id:telef1 class:tel]  </strong></label><p/>      
</div>
    <div id="right">
         <label><strong>Email [email* your-email id:email1]</strong> </label> <br/>
         <label><strong>Telemóvel [text* telemovel id:telem1 class:tel]</strong></label><p/>

    </div>
</div>
<label><strong>Habilitações[text habilit1 id:habilit1]</strong> </label></p>
<label><strong>Acções frequentadas e/ou experiência[text experiencia     id:experiencia1]</strong></label></p>
&nbsp;
<h5><strong>Dados para facturação</strong></h5>
<label><strong>Entidade[text entidade id:entidade1]</strong></label><p/>
<label><strong>Morada[text morada id:morada1]</strong></label><p/>
<div class="clearfixform">
   <div id="left">
      <label><strong>Código postal [text codpostal id:codpostal1] </strong></label><p/> 

   </div>
   <div id="right">
         <label><strong>NIF [text nif1 id:nif1 class:nif]</strong></label><p/>

   </div>
</div>
<label><strong>Interlocutor diferente de participante[acceptance    interlect1 id:interlect1]</strong></label>
[group Interlocutor]
<label><strong>Nome intelocutor[text interlocutor1 id:interlocutor1]  </strong></label>
<div class="clearfixform">
  <div id="left">
        <label><strong> Telefone[text telfint1 id:telfint1 class:tel] </strong></label><p/>
  </div>
  <div id="right">
         <label><strong>Email[email emailint1 id:emailint1]</strong>  </label> <p/>
  </div>
</div>
[/group]
&nbsp;
<p></p>
<h5><strong>Dados para pagamento</strong></h5>
<label><strong>Tipo de inscrição</strong></label></br>
<div class="tipoin">
<input type="radio" id="tipo1" name="tipo_insc" value="1ª vez normal" checked="checked">1ª vez normal
<input type="radio" id="tipo2" name="tipo_insc" value="1ª vez antecipada">1ª vez antecipada
<input type="radio" id="tipo3" name="tipo_insc" value="2ª vez normal">2ª vez normal
<input type="radio" id="tipo4" name="tipo_insc" value="2ª vez normal">2ª vez antecipada
</div>

&nbsp;
<label><strong>Vários participantes na mesma factura[acceptance vparticipant1 id:vparticipant1]</strong></label>
[group varios1]
<label><strong>Nº participantes:[text participantes1 id:participantes1]</strong></label>
<label><strong>Nome participantes:[text partnome1 id:partnome1]</strong> </label>
[/group]
&nbsp;
<div class="clearfixform">
 <div id="left">
Valor base (€) <INPUT TYPE="button" NAME="button" Value="=" onclick="calculo1()"/>   [text valor1 id:valor1 class:money]</p>         
 </div>
 <div id="right">             
Valor com IVA (€)<INPUT TYPE="button" NAME="button1" Value="=" onclick="calculoiva1()"/>   [text valor2 id:valor2 class:money]</p>
 </div>
</div>
[hidden Tipo_insc1 id:tipo_insc1]
&nbsp;
<label><strong>Desconto/parceria[acceptance parceria1 id:parceria1]</strong></label>
[group cod_parceiro]
<label><strong>Insira o código:[text cod_parc1 id:cod_parc1]
[/group]
&nbsp;
<div class="clearfixform">
  <div id="left">
   Data inscrição <INPUT TYPE="button" NAME="button3" Value="="  onclick="data1()"/> [text data_insc id:datainsc class:data]</p>         
  </div>
  <div id="right">
  &nbsp; 
 <strong>[checkbox* concordo id:concordo label_first "Confirmo que li e   aceito as condições de participação"]</strong></p>      
  </div>
 </div>
 <p></p>
 [recaptcha]
 <div align="center">
  [submit id:enviar1 "Enviar"]
 </div>

I have news. I figured out why I didn’t get any messages when I tried to send the form.

This was because my Ubmit button was like this: <input id=enviar1 class=”wpcf-form-control wpcf7-submit” value=”enviar” disable=”disable” type=”submit”>

By removing the disable="disable" statement I was able to get the messages. Now I have two problems:

1- How to remove this statement permanently

2- Although having created an acceptance field to accept the terms, I always get the message "You must accept the terms and conditions before sending your message." whether the field on or off.

  • Test placing Javascript after HTML.

  • "How to definitely remove this statement" that instruction?

  • disable statement="disable"

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.