We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24382
    • 0 Posts
    I am having trouble getting the form to work. It does not send messages and does not redirect.

    I am using Revo 2.0.

    I do receive an email when tested with QuickEmail.

    Here is how I have it set up right now.

    I have resource called contact. I have put the following code in the resource content section:

    [[!FormIt?
    &hooks=`email`
    &emailTpl=`myEmail`
    &emailTo=`[email protected]`
    &redirectTo=`2`
    ]]

    <h2>Contact Form</h2>

    [[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]

    <form action="[[~[[*id]]]]" method="post" class="form">

    <label for="name">
    Name:
    <span class="error">[[!+fi.error.name]]</span>
    </label>
    <input type="text" name="name" id="name" value="[[!+fi.name]]" />

    <label for="email">
    Email:
    <span class="error">[[!+fi.error.email]]</span>
    </label>
    <input type="text" name="email" id="email" value="[[!+fi.email]]" />

    <label for="subject">
    Subject:
    <span class="error">[[!+fi.error.subject]]</span>
    </label>
    <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" />

    <label for="text">
    Message:
    <span class="error">[[!+fi.error.text]]</span>
    </label>
    <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea>


    <label>
    Numbers:[[+fi.error.numbers]]
    <select name="numbers" value="[[!+fi.numbers]]">
    <option value="">Select an option...</option>
    <option value="one" [[!+fi.numbers:FormItIsSelected=`one`]]>One</option>
    <option value="two" [[!+fi.numbers:FormItIsSelected=`two`]]>Two</option>
    <option value="three" [[!+fi.numbers:FormItIsSelected=`three`]]>Three</option>
    </select>
    </label>

    <label>
    Colors:[[!+fi.error.colors]]
    <input type="hidden" name="colors[]" value="" />
    </label>
    <ul>
    <li>
    <label><input type="checkbox" name="colors[]" value="red" [[!+fi.colors:FormItIsChecked=`red`]] /> Red</label>
    </li>
    <li>
    <label><input type="checkbox" name="colors[]" value="blue" [[!+fi.colors:FormItIsChecked=`blue`]] /> Blue</label>
    </li>
    <li>
    <label><input type="checkbox" name="colors[]" value="green" [[!+fi.colors:FormItIsChecked=`green`]] /> Green</label>
    </li>
    </ul>


    <br class="clear" />

    <div class="form-buttons">
    <input type="submit" value="Send Contact Inquiry" />
    </div>
    </form>



    and I have created a chunk called myEmail.

    This is the Formit Email Chunk.


    [[+name]] ([[+email]]) Wrote:


    [[+text]]



    Any help would be appreciated.
      • 27579
      • 2 Posts
      redirect problem

      instead of

      &hooks=`email`


      try

      &hooks=`email,redirect`
        • 24382
        • 0 Posts
        I tried adding redirect to the hook but it still does not redirect. Thanks for the suggestion though.

        Its acting like its not even reading the snippet. I even uninstalled and reinstalled FormIt but that does not work either.

          • 10793
          • 0 Posts
          Have the same problem.
          Moreover... if I take out the &hook and leave only a &validate option, FormIt does not validate.

          It seems that he don’t recognize the snippet.

          I’m on Modx Revo 2.0.8

          and the call is:

          [[!FormIt?
          &validate=`contact_name:required, contact_phone:isNumber`
          ]]
          


          There must be a HUGE mistake here but I can’t see it...

          Many thanks in advance
            • 10793
            • 0 Posts
            Sorry, I forgot to say that I’m testing FormIt on a localhost, Ubuntu 10.04.

            I know the issue with smtp configuration on local test environment, but I guessed that the validator worked.

            Any help appreciated.
            Tnx

              • 10793
              • 0 Posts
              I solved most of my issues, nw the form validates and redirect.
              To test email I wait to upload the website on a test server, now I’m on localhost.

              I’m still having trouble with generic error messages and with success messages, but I will open new topic.

              Bye