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.

Symbols in number field

  1. AB
    Member

    I have a number field and would like the ability to only accept a period symbol in addition to numbers. How can I go about doing this? I tried just using a text field instead, but users were putting commas and dollar signs in their entries and it messes up my export process.

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink
  2. Do you have a link to your form online?

    You could use a text field, then perform specific validation to return an error when the user does not enter something correctly (check for numbers and 0 or 1 decimal point) or modify the value they entered to strip out any of the bad input. Here is documentation on the gform_validation_hook:

    http://www.gravityhelp.com/documentation/page/Gform_validation

    More comprehensive example:
    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink