We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19388
    • 297 Posts
    Hi!
    I started using FormIt, and after some problems little problems caused by tinymce, I have it working. But now I have a problem. In my page there is only one form. I’m using validation, but if a left a requiered field blank, the validation message is shown but the fields are not repopulated. Any idea what could be happening?

    Here is the code
    [[!FormIt? &hooks=`email,redirect` &emailTpl=`emailContacto` &emailTo=`[email protected]` &redirectTo=`145` &validate=`nombre:required, email:email:required, mensaje:required, telefono:required` ]]
    <h2><strong>Formulario de contacto </strong></h2>
    <p>[[+fi.error.error_message]]</p>
    <form id="form_contacto" name="form_contacto" method="post" action="[[~[[*id]]]]"> 
      <p>
        <label for="nombre"><span class="[[!+fi.error.nombre:notempty=`error`]]">Nombre</span>
        </label>
        <input type="text" name="nombre" id="nombre"  />[[+fi.error.nombre]]
      </p>
      <p>
        <label for="telefono"><span class="[[!+fi.error.telefono:notempty=`error`]]">Teléfono</span>
        </label>
        <input type="text" name="telefono" id="telefono" />[[+fi.error.telefono]]
      </p>
      <p>
        <label for="email"><span class="[[!+fi.error.email:notempty=`error`]]">E-Mail</span>
        </label>
        <input type="text" name="email" id="email"  />[[+fi.error.email]]
      </p>
      <p>
        <label for="mensaje"><span class="[[!+fi.error.mensaje:notempty=`error`]]">Mensaje</span>
        </label>
        <textarea name="mensaje" rows="4" id="mensaje" ></textarea>       [[+fi.error.mensaje]]
      </p>
      <p>
        <input type="submit" name="enviar" id="enviar" value="Enviar"  />
      </p>
    </form>

      • 28215
      • 4,149 Posts
      You need to specify their value:

      <input type="text" name="nombre" id="nombre" value="[[+fi.nombre]]"  />
      
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 19388
        • 297 Posts
        Upsssssssssss!!! Sorry for the silly question! And thanks for solve it smiley