PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Enter required value

  1. I would like to add a Single Line field and have the Label say, "what is 10 + 10" (for spam filtering). Is there any option to set a required value (in this case, 20)?

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  2. You can do this using a Number field and the range option. Add a Number field to your form, for the field label use your question (ex. "What is 10 + 10?") and then use the range option to set the range so that only the correct answer will validate.

    But a better way is to install the Really Simple Captcha plugin. Once you install that plugin it will add additional options to the Gravity Forms Captcha field, including a Math Captcha option. This is a better method as it will use images for the numbers, harder for spam bots to defeat.

    Although some spam bots are smart enough to answer math questions.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  3. Thanks for the reply. I installed the RSC plugin and created a Captcha field and changed the type to Math Challenge, but I don't see any options and no instructions on the published form.

    You can see the result on a site I am currently developing: http://keeprightllc.com/beta/

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  4. Looks like you have lots of issues with that site. The CSS and JS for Gravity Forms isn't being output on the page which means you may have a theme that doesn't have standard code in pilace.

    You need to make sure your head.php has the wp_head() function call and your footer.php has the wp_footer() function call.

    The fact that the images aren't being generated by the Really Simple Captcha plugin points to a possible file permission issue. Make sure you check the Really Simple Captcha documentation to see what file permissions need to be setup to use that plugin.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  5. I haven't added any CSS or JS to this site yet. I'm still in early development stage. What does Gravity Form use as the tmp folder for the RSC plugin?

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  6. Gravity Forms adds JS and CSS automatically, however it can only do this if your theme is built using standard conventions and best practices. 2 things every theme needs to do is call the wp_head() function call in the header.php file before the end HEAD tag and call the wp_footer() function call in the footer.php before the close BODY tag.

    Every theme should have these in place and it is how plugins like Gravity Forms output code in the header and footer of the site. Without them, Gravity Forms is unable to output the necessary CSS and Javascript for it to work properly.

    You can read about these function calls here:

    http://codex.wordpress.org/Theme_Development

    http://codex.wordpress.org/Function_Reference/wp_head

    http://codex.wordpress.org/Function_Reference/wp_footer

    The captcha images are generated and saved in the wp-content/uploads/gravity_forms folder which must be writeable. Try setting this folder and subfolders to CHMOD 777. If the uploads/gravity_forms folder doesn't exist then Gravity Forms was unable to create it. Set your wp-content/uploads folder to CHMOD 777 and then save and try the form again.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  7. Carl,

    I have set up my theme correctly but I haven't finished the CSS styling yet and I turned off the CSS output in the GF settings. I also have the folder permissions correctly set on my server. I think the problem might be that I don't have the GD or FreeType Libraries on my server to make this work.

    I think I'm gonna stick with the Honeypot option.

    Thanks,
    Dan

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  8. I just checked my server PHP info and GD and FreeType libraries are enabled.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  9. If Really Simple Captcha isn't working then you may need to check with the support forum for RSC on WordPress.org, it's not a plugin we created. Gravity Forms works with it, but it's not a plugin we created.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  10. Thanks for your help Carl.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  11. f_devocht
    Member

    I want to do the same thing, using a number field and using the range to limit the possible answer to one. However, if I do this, the answer is displayed beneath the question ... wich defeats the point.
    I don't want to use captcha.
    Reason is simple, I have a dutch site and every single spam mail I get is in english. Often people fill out the form and just fill in the captcha words as well.
    When I ask a question in dutch, the answer is much more difficult to find for non-dutch speaking spammers. Hence the number field.

    Posted 12 years ago on Wednesday October 26, 2011 | Permalink
  12. Hi f_devotht,

    Two options you might consider:

    1 - Enabling Honey Pot Spam Protection: http://grab.by/b884
    2- Installing the Really Simple Captcha plugin from the WP repository and then activating it via the standard Gravity Form Captcha field.

    Let me know if you have any questions on this.

    Posted 12 years ago on Wednesday October 26, 2011 | Permalink
  13. attorney
    Member

    Amazing. I had no idea this existed and just posted. This should definitely be a FAQ for sure.

    Posted 12 years ago on Thursday February 2, 2012 | Permalink
  14. pg
    Member

    Hi, would like to use a number field as a Promotion Code field.
    - Limit the number range to the same number (So only one number is possible to use)

    Feature Request: To incorporate this if Gravity Forms could incorporate a checkbox in the field editor to not display/hide the hint text, it would work.

    In the site style sheet I added "display:none;" to the class ".instruction". That works on the first submit, but then displays the hint text the next time its submitted.

    Goal being to have a simple validation method for a form text field that could be used a simple/none secure way to add promotional code field.

    Posted 11 years ago on Friday August 3, 2012 | Permalink
  15. If the "display:none" is not working when the page reloads, it's possible the class has changed and how it was targeted is being overridden.

    Can you post a link to the page please where this can be seen?

    Thank you for the feature request. I see how that could be useful in your case. We don't want to give away the answer in the hint.

    Posted 11 years ago on Friday August 3, 2012 | Permalink