We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13150
    • 17 Posts
    I seriously have gotten lost and tried several approaches to "simplifying" the math question for security on my client’s "Contact" page, but haven’t been able to tweak it successfully.
    Would anyone know how I can change the Math question to a single digit question instead of double digits on Formit (Modx Revolution 2.0.8), like how Evo has it in eForm?
    I’ve edited these lines in the Formit snippet:
    $mathMaxRange = $modx->getOption('mathMaxRange',$scriptProperties,1);
    $mathMinRange = $modx->getOption('mathMinRange',$scriptProperties,1);
    


    In addition, I’ve tried to adjust the [[!Formit properties]] as such, to no avail:

    [[!FormIt? &hooks=`spam,email,math,redirect` &emailTpl=`sendMailTpl` &emailTo=`[email protected]` &redirectTo=`74` &validate=`
    date:required:isDate=`%m/%d/%Y`,
    Name:required,
    Email:email:required,
    Title:required,
    Company:required,
    Sector:required,
    Inquiry:required,
    Message:required:stripTags,
    Details:required,
    mathMinRange:1,
    mathMaxRange:1` 
    &errTpl=`<br><div class="error" style="text-align:left; color:#999; font-weight:bold; font-size:12px; font-style:normal; float:left; ">[[+error]]</div>`
    &store=`0` ]]
    


    No matter what I do, nothing has worked. check it out: http://ahminc.com/ahm-inc/index.php?id=7

    I know, I know, it sounds silly, but apparently in the Marketing Communications Industry (B2B sector), I was told that these people don’t have the time to figure out a double digit math question. Utterly ridiculous to me, but a real time issue and brain buster for them.

    I am running out of time on this simple little issue. All help is appreciated.

    Sincerest regards,
    Kurt
      • 32316
      • 387 Posts
      Two things:
      you have the minimum and maximum math values both set to 1

      This needs to be fixed unless the equation is meant to be only 1+1 or 1-1 that would be pretty simple math.

      Also the syntax is wrong - I think you just need &mathMinRange=`1` &mathMaxRange=`9` in your call - these do not go in the &validator value


      See http://rtfm.modx.com/display/ADDON/FormIt.Hooks.math - though this page does not give any relevant examples
        • 13150
        • 17 Posts
        AWESOME!

        It worked. Thanks so much. I reset the Formit snippet to the limits it was originally set to. Then, I set the [[!Formit]] call settings as you indicated but with `1` as min and `9` as max, and it worked perfectly.

        Thank you so much. I do appreciate it. One less thing to deal with. I hope this helps other n()()bs.