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.

Masking for numeric values only

  1. I want the user to just enter numeric values ANY length, ie,
    2000 not $2000 or not 2,000
    how do I do that in the "input mask" section of the field?

    I looked at the link in http://gravitywiz.com/2012/05/24/format-field-as-currency/
    in a prior post but that was over my head.

    I'm not a programmer.

    Posted 12 years ago on Saturday September 22, 2012 | Permalink
  2. The input mask is designed to force input of a fixed length. Therefore, I don't believe you can use the input mask to force numbers 0 through 9 only. The number field will allow a decimal separator, so I don't believe you can use that.

    I think you will have to perform validation on the user's input, to ensure it is numeric only. Unfortunately, someone with a little programming skill will need to help you implement this. It's not something which can be managed from the form builder. Here is the filter you want to use: http://www.gravityhelp.com/documentation/page/Gform_validation

    Posted 12 years ago on Sunday September 23, 2012 | Permalink
  3. Okay might have to find a programmer or if you could tell me how to make the field description
    closer to the field that would probably work. There appears to be a blank line.
    Here is what the field and description look like:
    What is the maximum monthly payment you can afford? *

    Digits only please. No $ or commas.

    Or see http://www.leaseoptiondango.com/all-available-homes2/

    Now Rob gave me this code that I inserted and tweaked the form a bit. He gave me:
    #content .page #gform_wrapper_3 ul ii {
    margin-botton: lOpx;

    }

    #gform_wrapper_3 .gfield_label {
    font-weight: normal;

    }

    So could I modify that code to make the blank line go away?

    Posted 12 years ago on Sunday September 23, 2012 | Permalink
  4. How about this:

    [css]
    body .gform_wrapper .gfield_description {
        padding-top: 0px!important;
    }

    That will put all the field descriptions right up against the form field.

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  5. I added that to the style sheet at the bottom and it didn't do anything to the description. I put:< br/>
    body .gform_wrapper_3 .gfield_description {
    padding-top: 0px!important;
    }
    where the "_3" is the form number and I tried it without the "_3" no difference.

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  6. Could it be that I got this:
    #content .page #gform_wrapper_3 ul ii {
    margin-botton: lOpx;

    so the 10px is creating that space?

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  7. Is there a way to put it just below the label instead of after the field?

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  8. Please copy and paste the text here that you want moved. I am unclear on what you want moved and where you want it moved. Thank you.

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  9. http://www.leaseoptiondango.com/all-available-homes2/ on this page you'll see
    The field label:
    What is the maximum monthly payment you can afford? *
    Below that you'll see the description:
    Digits only please. No $ or commas.

    Can I put the description directly under the field label before the input box?

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  10. On the form settings tab, you have a drop down for both label placement and description placement. Choose "top aligned" for label placement and "above inputs" for the description and you will have what you want, I believe.

    Settings: http://minus.com/lsXGgpluFFzFO
    Output: http://minus.com/lbuWDXRc0lQu9i

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  11. Thanks that works!

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  12. Very good. We'll consider this case closed.

    Posted 12 years ago on Wednesday September 26, 2012 | Permalink

This topic has been resolved and has been closed to new replies.