We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3722
    • 171 Posts
    I have followed the instructions for adding the call and HTML code to my form.
    All I get is a question mark and the entry field. The math problem does not show up.

    Do I have to set the Available Properties somewhere?
    How do I do that?

    I tried adding this the the Formit call, but did not change anything.
    &mathMinRange=`10`


    Does anyone have a more detailed example or instructions?

    Thanks
    BG66
      • 3749
      • 24,544 Posts
      I’m just guessing, but Shaun is especially busy right now.

      - Do you have the latest version of FormIt?
      - Are the GD and FreeType libs enabled?
      - Do you have all of the following placeholders in your form:

      <label>[[!+fi.op1]] [[!+fi.operator]] [[!+fi.op2]]?</label>
      [[!+fi.error.math]]
      <input type="text" name="math:required" value="[[!+fi.math]]" />
      <input type="hidden" name="op1" value="[[!+fi.op1]]" />
      <input type="hidden" name="op2" value="[[!+fi.op2]]" />
      <input type="hidden" name="operator" value="[[!+fi.operator]]" />
      


      If that doesn’t help, post your Formit Tag and the math part of the form.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 3722
        • 171 Posts
        Thanks Bob,

        Do you have the latest version of FormIt?
        I just updated my FormIt from 1.5.0 to 1.5.2 RC2

        Are the GD and FreeType libs enabled?
        Not sure what that is, but I checked my PHPinfo and found this:
        gd
        GD Support 	enabled
        GD Version 	bundled (2.0.34 compatible)
        FreeType Support 	enabled
        FreeType Linkage 	with freetype
        FreeType Version 	2.2.1
        GIF Read Support 	enabled
        GIF Create Support 	enabled
        JPG Support 	enabled
        PNG Support 	enabled
        WBMP Support 	enabled
        XBM Support 	enabled 


        This is what I have in my form.
        [[!FormIt?
           &hooks=`recaptcha,spam,email,redirect,math`
           &emailTpl=`PlayerEmailChunk`
           &emailTo=`[email protected]`
           &emailSubject=`Player Contact Form`
           &redirectTo=`17`
           &validate=`name:required,
              email:required,
              text:required:stripTags,
              numbers:required,
              colors:required` 
        ]]
        
        <label>[[!+fi.op1]] [[!+fi.operator]] [[!+fi.op2]]?</label>
        [[!+fi.error.math]]
        <input type="text" name="math:required" value="[[!+fi.math]]" />
        <input type="hidden" name="op1" value="[[!+fi.op1]]" />
        <input type="hidden" name="op2" value="[[!+fi.op2]]" />
        <input type="hidden" name="operator" value="[[!+fi.operator]]" />
        


        Still not working, just the "?" symbol.
        Checking the page source code I get this
        <br class="clear" />
        <label>  ?</label>
        
        <input type="text" name="math:required" value="11" />
        <input type="hidden" name="op1" value="" />
        <input type="hidden" name="op2" value="" />
        <input type="hidden" name="operator" value="" />
        


        Thanks
        BG66
          • 3749
          • 24,544 Posts
          I don’t see anything wrong. Try putting the &validate string all on one line with no spaces in it.


          Is that source of the page the whole thing? If so, the missing template structure (<html><head><body>) and the missing Doctype could be the problem.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 28215
            • 4,149 Posts
            Try putting the math hook first.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 3722
              • 171 Posts
              Thanks Guys!
              It’s now working. I think it was the &validate string.
              There was a lot of spaces and junk in it.
              Put it on one line, cleared my cache and it works!

              Thanks
              BG66