We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28625
    • 24 Posts
    Hi to all. You’re dealing with a very basic user here! I’m self taught and have benefitted from all the experiences of other users but I seem to have hit a brick wall with one of my forms. The English version of the form works perfectly but on my Spanish version it just keeps redirecting to the main site page, something our site does when it can’t find the page. I don’t fill anything in and it doesn’t even do the field verification. I’ve checked loads of times and it’s driving me mental. I’ve probably just left out a comma somewhere so if it’s not too much trouble, would someone mind having a look at the portion of my CHUNK code below and seeing if there’s an error ot two please?
    Thanks in advance, Chris.
    PS. Apologies if this is posted in the wrong place. I’m still not 100% sure about forums!
    <p class="error"><span style="color: #ff6600"><font color="#ff0000">[+validationmessage+]</font></span></p>
    <form method="post" id="ins-autoFORMes">
    <input name="formid" type="hidden" value="ins-autoFORMes" />
    <p>
        <label for="apellido1">Primer Apellido</label>
                
        <input name="apellido1" type="text" id="apellido1" size="30" eform="apellido1:string:1" />
      </p>
      <p>
        <label for="apellido2">Segundo Apellido</label>
             <input name="apellido2" type="text" id="apellido2" size="30" eform="apellido2::" />
      </p>
      <p>
        <label for="nombres">Nombre(s)</label>
                      <input name="nombres" type="text" id="nombres" size="30" eform="nombres:string:1" />
        <br />
        <br />
        <label for="fdn">Fecha de Nacimiento</label>
         <input name="fdn" type="text" id="fdn" size="30" eform="fdn:string:1" />
      </p>
      <p>
        <label for="nacionalidad">Nacionalidad</label>
                   <input name="nacionalidad" type="text" id="nacionalidad" size="30" eform="nacionalidad::" />
      </p>
      <p><label for="sexo">Sexo</label>        
        <label>
          <input type="radio" name="sexo" value="Hombre" id="sexo1" eform="sexo::1" />
        Hombre</label> 
        <label>
          <input type="radio" name="sexo" value="Mujer" id="sexo2" />
          Mujer</label>
      </p>
      <p>
        <label for="id">Número DNI/NIE/Pasaporte</label>
         <input name="id" type="text" id="id" size="30" eform="id:string:1" />
      </p>
      <p><label for="email">Email</label>
                 
        <input name="email" type="text" id="email" size="50" eform="email:email:1" />
      </p>
      <p><label for="telefono">Teléfono</label>
              <input name="telefono" type="text" id="telefono" size="30" eform="telefono:string:1" /><br /> 
        (Incluir prefijo del país y región)<br />
        <br />
        <label for="pais">País donde vive usted</label>   <select name="pais" dir="ltr" lang="es" eform="pais::1">
          <option value="ELEGIR PAIS" selected="selected">ELEGIR PAIS</option>
          <option value="España">España</option>
          <option value="Reino Unido">Reino Unido</option>
          <option value="Otro">Otro</option>
        </select>
      </p>
    <p>
        <label for="numcarnet">Número del Carnet</label>
          <input name="numcarnet" type="text" id="numcarnet" size="30"  eform="numcarnet:string:1" />
      </p>
      <p>
        <label for="fechacarnet">Fecha del Carnet</label>
            <input name="fechacarnet" type="text" id="fechacarnet" size="30"  eform="fechacarnet:string:1" />
      </p>
      <p>
        <label for="paiscarnet">País del Carnet</label>
              <input name="paiscarnet" type="text" id="paiscarnet" size="30"  eform="paiscarnet::1" />
      </p>
      <p>
        <label for="tipovehiculo">Tipo de Vehículo</label>
           
        <select name="tipovehiculo" dir="ltr" lang="es" eform="tipovehiculo::1" >
          <option value="ELEGIR VEHICULO" selected="selected">ELEGIR VEHICULO</option>
          <option value="Coche">Coche</option>
          <option value="Moto">Moto</option>
          <option value="Camión">Camión</option>
          <option value="Furgoneta">Furgoneta</option>
          <option value="Bicicleta">Bicicleta</option>
          <option value="Otro">Otro</option>
      </select></p>
      <p>
        <label for="tipomotor">Tipo de Motor</label>
               
        <select name="tipomotor" dir="ltr" lang="es" eform="tipomotor::1" >
          <option value="ELEGIR MOTOR" selected="selected">ELEGIR MOTOR</option>
          <option value="Gasolina">Gasolina</option>
          <option value="Diesel">Diesel</option>
          <option value="Eléctrico">Eléctrico</option>
          <option value="Otro">Other</option>
        </select></p>
      <p>
        <label for="tamanyomotor">Tamaño del Motor</label>
               <input name="tamanyomotor" type="text" id="tamanyomotor" size="30"  eform="tamanyomotor:string:1" /><br /> 
        (Ej. 1.6, 1600 etc.)
      </p>
      <p>
        <label for="marcavehiculo">Fabricante del Vehículo</label>
         <input name="marcavehiculo" type="text" id="marcavehiculo" size="30"  eform="marcavehiculo:string:1" /><br /> 
        (Ej. Ford, Opel, VW, Toyota etc.)
      </p>
      <p>
        <label for="modelovehiculo">Modelo del Vehículo</label>
             <input name="modelovehiculo" type="text" id="modelovehiculo" size="30"  eform="modelovehiculo:string:1" /><br /> 
        (Ej. Fiesta, Vectra, Golf, Avensis etc.)
      </p>
      <p>
        <label for="puertas">Número de Puertas</label>
              <input name="puertas" type="text" id="puertas" size="30"  eform="puertas:string:1" />
      </p>
      <p>
        <label for="anyomat">Año de la PRIMERA Matriculación</label>
         <input name="anyomat" type="text" id="anyomat" size="10"  eform="anyomat:string:1" />
      </p>
      <p>
        <label for="matricula">Matrícula</label>
                         <input name="matricula" type="text" id="matricula" size="30"  eform="matricula:string:1" />
      </p>
      <p>
        <label for="colorvehiculo">Color del Vehículo</label>
             <input name="colorvehiculo" type="text" id="colorvehiculo" size="30"  eform="colorvehiculo:string:1" />
      <p>
        <label for="estadovehiculo">Estado del Vehículo</label>
         
        <select name="estadovehiculo" dir="ltr" lang="es" eform="estadovehiculo::1" >
          <option value="ELEGIR ESTADO" selected="selected">ELEGIR ESTADO</option>
          <option value="Excelente">Excelente</option>
          <option value="Notable">Notable</option>
          <option value="Bien">Bien</option>
          <option value="Regular">Regular</option>
        </select></p>
       <p>
        <label for="usovehiculo">Uso del Vehículo</label>
               <input name="usovehiculo" type="text" id="usovehiculo" size="30"  eform="usovehiculo:string:1" /><br /> 
        (Ej. Trabajo, Privado, etc.)
      </p>
     <p>
        <label for="polizaactual">¿Tiene usted una póliza actual?</label>
        <label>
          <input type="radio" name="polizaactual" value="No" id="polizaactual1" eform="polizaactual::1" />
          No</label>  
        <label>
          <input type="radio" name="polizaactual" value="Sí" id="polizaactual2" />
          Sí</label>
        <br />
        Si es que SÍ, indicar el nombre de la compañía y el número de la póliza:
        <br />
        <input name="polizaactualnombre" type="text" size="65" eform="polizaactualnombre::" />
        <br />
        Fecha de renovación (si aplica):       <input name="fecharenovacion" type="text" eform="fecharenovacion::" />
    <br />
        Precio de la renovación (si aplica):    <input name="preciorenovacion" type="text"  eform="preciorenovacion::" />
      </p>
      <p><label for="formadepago">Forma de Pago Preferida</label>
           <label>
          <input type="radio" name="formadepago" value="Anual" id="formadepago1" eform="formadepago::1" />
          Anual</label>  
        <label>
          <input type="radio" name="formadepago" value="Mensual" id="formadepago2" />
      Mensual</label> 
    <label>
          <input type="radio" name="formadepago" id="formadepago3"  value="Cada 6 Meses"  />
      Cada 6 Meses</label></p>
    <p>
        <label for="substituto">&iquestDesea un vehículo de courtesía?</label>
        <label>
          <input type="radio" name="substituto" id="substituto1"  value="No" eform="substituto::1" />
          No</label>   
        <label>
          <input type="radio" name="substituto" id="substituto"  value="Sí"  />
          Sí</label>
        <br />
        (Se puede dar un vehículo de courtesía en el caso de un accidente, mientras se repara el suyo.)</p>
       <p>
        <label for="tiposeguro">Tipo de Seguro Deseado:</label>
         
        <select name="tiposeguro" dir="ltr" lang="es" eform="tiposeguro::1" >
          <option value="ELEGIR SEGURO" selected="selected">ELEGIR SEGURO</option>
          <option value="Todo Riesgo">Todo Riesgo</option>
          <option value="Terceros">Terceros</option>
        </select></p>
      <p><label for="comentarios">Por favor, darnos cualquier información que piensa es necesario, como por ejemplo, cobertura adicional que desea (Incendios, Robo, Lunas etc.):</label> <br />
        <textarea name="comentarios" cols="60" rows="10" eform="comentarios::"></textarea>
      </p>
     <p align="center">
        Introduzca el código anti-Spam que aparece a continuación:<br />
        <img src="[+verimageurl+]" alt="verification code" border="1"/>
        </p>
        <p align="center">
        <label accesskey="c" for="vericode">Código</label>
        <input type="text" name="vericode" size="20" />
        </p>
    <p>
        <label for="howhear">Finalmente, ¿Cómo nos ha encontrado?</label>
        <select name="howhear" dir="ltr" lang="es" eform="howhear::1">
          <option value="ELEGIR FUENTE" selected="selected">ELEGIR FUENTE</option>
          <option value="Nuestro Web ICP">Nuestro Web ICP</option>
          <option value="Agente Inmobiliaria">Agente Inmobiliaria</option>
          <option value="Recomendación">Recomendación</option>
          <option value="Televisión">Televisión</option>
          <option value="Radio" >Radio</option>
          <option value="Revista" >Revista</option>
          <option value="Periódico">Periódico</option>
          <option value="Otro">Otro</option>
        </select></p>
    <p align="justify">Las copias de los documentos que necesitamos para darle la póliza son: Documento de identidad (DNI/NIE/Pasaporte etc.), Carnet de conducir, Ficha técnica del vehículo, ITV, y los 20 dígitos de su cuenta bancaria.</p>
    <p align="center">
    	<input class="bt" name="submit" type="submit" value="Solicitar Presupuesto" /> <input class="bt" id="_reset" type="reset" value="Borrar Todo" /></p>
    </form>
    

    THE ACTUAL PAGE CALL TO THE CHUNK IS THIS:
    [!eForm?&formid=`ins-autoFORMes` &language=`spanish` &tpl=`ins-autoFORMes` &report=`ins-autoREPORTes` &thankyou=`ins-THANKSes` &to=`XXX@MYEMAILADDRESS` &subject=`SPANISH General Insurance Request from ICP website` &from=`((email))` &fromname=`((nombre))&nbsp;((apellido1))&nbsp;((apellido2))` &vericode=`1`!]
      • 33337
      • 3,975 Posts
      Can you verify if Spanish language is present in the snippet’s lang folder.

      note: I also edited ur post to wrap the code tags around the code. hope u dont mind tongue
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 28625
        • 24 Posts
        Hiya Zi,
        Yes it is present and of course I don’t mind. Thanks for being dilligent. At the moment I’ve given up with looking for errors and I’ve just copied my English original form and am translating each part bit by bit and testing it to make sure it works.
        Cheers.
          • 28625
          • 24 Posts
          I’ve found the culprit! It’s with the passport field that I had given a name of "ID", which seemed to throw the whole form into a fit. See the code excerpt below:
          <p>
              <label for="id">Número DNI/NIE/Pasaporte</label>
               <input name="id" type="text" id="id" size="30" eform="id:string:1" />
            </p>
          

          In the end I just changed it to "numid" and it works fine! You can see the finished result here: http://www.ideal-country-property.com/es/insauto
          Case closed!
            • 10313
            • 375 Posts
            Hello,

            I have a similar problem (so I think). I have an eForm on my page:

            [!eForm? &formid=`fbkauf` &tpl=`formKauf` &report=`reportKauf` &to=`my@email` &subject=`Meine Meinung` &sendAsText=`1` &protectSubmit=`0`!]


            This shows the form. HTML Validator says: no errors or warnings on my page. Now, if I hit "submit", nothing happens. At least not what I expect. The page reloads. But there is no message that the form is not filled correctly (missing fields). And if I populate the form, the result is the same. The form shows again.

            I’m using this template:

            [+validationmessage+]
            <form method="post" action="[~[*id*]~]" id="kontakt">
            
              <fieldset>
                <legend>Beratung/Bedienung</legend>
                <p>Die Beratung/Bedienung war ...</p>
                <input type="radio" class="radio" name="beratung" id="beratung1" value="sehr gut"><label class="rechts" for="beratung1">sehr gut</label><br/>
                <input type="radio" class="radio" name="beratung" id="beratung2" value="gut"><label class="rechts" for="beratung2">gut</label><br/>
                <input type="radio" class="radio" name="beratung" id="beratung3" value="unzureichend, weil"><label class="rechts" for="beratung3">unzureichend, weil</label>
                <textarea class="zusatz" id="zusatzberatung" name="zusatzberatung" rows="1" cols="40" eform="unzureichend, weil:string:0"></textarea><br/>
              </fieldset>
            
            
              <fieldset>
                <legend>Brille</legend>
                <p>Mit meiner Brille bin ich ...</p>
                <input type="radio" class="radio" name="brille" id="brille1" value="sehr zufrieden"><label class="rechts" for="brille1">sehr zufrieden</label><br/>
                <input type="radio" class="radio" name="brille" id="brille2" value="zufrieden"><label class="rechts" for="brille2">zufrieden</label><br/>
                <input type="radio" class="radio" name="brille" id="brille3" value="unzufrieden, weil"><label class="rechts" for="brille3">unzufrieden, weil</label>
                <textarea class="zusatz" id="zusatzbrille" name="zusatzbrille" rows="1" cols="40" eform="unzufrieden, weil:string:0"></textarea><br/>
              </fieldset>
            
            
              <fieldset>
                <legend>Termin</legend>
                <p>Die Fertigstellung/Termineinhaltung war ...</p>
                <input type="radio" class="radio" name="termin" id="termin1" value="schnell/exakt"><label class="rechts" for="termin1">schnell/exakt</label><br/>
                <input type="radio" class="radio" name="termin" id="termin2" value="normal"><label class="rechts" for="termin2">normal</label><br/>
                <input type="radio" class="radio" name="termin" id="termin3" value="zu lang"><label class="rechts" for="termin3">zu lang</label>
              </fieldset>
              
            
              <label for="anregungen" class="pflicht">Weitere Anregungen/ Kritik:</label>
              <textarea id="anregungen" name="anregungen" rows="5" cols="40" eform="Anregungen, Kritik:string:1"></textarea><br/>
              
              <label for="name" class="pflicht">Name:</label>
              <input type="text" class="text" id="name" name="name" eform="Name:string:1"/><br/>
            
              <label for="strasse">Straße:</label>
              <input type="text" class="text" id="strasse" name="strasse" eform="Strasse:string:0"/><br/>
            
              <label for="ort" class="pflicht">Ort:</label>
              <input type="text" class="text" id="ort" name="ort" eform="Ort:string:1"/><br/>
            
              <label for="email" class="pflicht">E-Mail:</label>
              <input type="text" class="text" id="email" name="email" eform="E-Mail:string:1"/><br/>
            
              <label for="submit"> </label>
              <input type="submit" id="submit" value="Absenden">
            </form>
            


            But even if I take a different template from a different website where the eForm is working as expected, my eForm here does nothing. So the form won’t be the reason.

            I have no idea sad

            I’m using evolution 1.0.0 with eForm 1.4.4.6

            Thanks for any ideas
            Martin
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Your &formid parameter has to match with either the value of a hidden input field or the id of the form.
              <form method="post" action="[~[*id*]~]" id="fbkauf"> 
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 10313
                • 375 Posts
                Thousand thanks, Susan!

                I copied the template code from a different site of mine and didn’t mind th "id" at all.

                It works smiley
                Martin